Skip to content

Commit

Permalink
trim the repo owner
Browse files Browse the repository at this point in the history
  • Loading branch information
tashima42 committed Dec 5, 2024
1 parent 05a0e50 commit a6e575c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion actions/publish-image/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,14 @@ runs:
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" ]] && [[ "${GITHUB_REPOSITORY}" != "rancher/ecm-distro-tools" ]]; 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 a6e575c

Please sign in to comment.