diff --git a/actions/publish-image/action.yaml b/actions/publish-image/action.yaml index b3262209..20006b65 100644 --- a/actions/publish-image/action.yaml +++ b/actions/publish-image/action.yaml @@ -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