Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI - Only tag extra docker images on tag refs #2335

Open
wants to merge 5 commits into
base: bfops/align-merge-script
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions tools/merge-docker-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,11 @@ docker manifest push "${IMAGE_NAME}":$FULL_TAG
GITHUB_REF="${GITHUB_REF-}"
# re-tag the manifest with the GitHub ref
echo "GITHUB_REF is ${GITHUB_REF}"
ORIGINAL_VERSION=${GITHUB_REF#refs/*/}
VERSION=$(sanitize_docker_ref "$ORIGINAL_VERSION")
echo "Tagging image with sanitized GITHUB_REF: $VERSION (original: $ORIGINAL_VERSION)"
docker buildx imagetools create "${IMAGE_NAME}":$FULL_TAG --tag "${IMAGE_NAME}":$VERSION
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
ORIGINAL_VERSION=${GITHUB_REF#refs/*/}
VERSION=$(sanitize_docker_ref "$ORIGINAL_VERSION")
echo "Tagging image with sanitized GITHUB_REF: $VERSION (original: $ORIGINAL_VERSION)"
docker buildx imagetools create "${IMAGE_NAME}":$FULL_TAG --tag "${IMAGE_NAME}":$VERSION
fi

echo "Image merging and tagging completed successfully."
Loading