Skip to content

Commit

Permalink
bypass docker.io lock on ecm distro tools (#511)
Browse files Browse the repository at this point in the history
* check if the repository is ecm distro tools

* trim the repo owner
  • Loading branch information
tashima42 authored Dec 5, 2024
1 parent e8f7bee commit 63ab1b9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion actions/publish-image/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,15 @@ runs:
shell: bash
if: ${{ inputs.push-to-prime == true || inputs.push-to-prime == 'true' }}
run: |
export GITHUB_REPOSITORY=${{ github.repository }}
GITHUB_REPOSITORY="${GITHUB_REPOSITORY#*/}" # trim the owner
if [[ -z "${REGISTRY}" ]]; then
echo "Prime registry cannot be empty"
exit 1
fi
if [[ "${REGISTRY}" == "docker.io" ]]; then
if [[ "${REGISTRY}" == "docker.io" ]] && [[ "${GITHUB_REPOSITORY}" != "ecm-distro-tools" ]]; then
echo "Prime registry cannot be docker.io"
exit 2
fi
Expand Down

0 comments on commit 63ab1b9

Please sign in to comment.