-
Notifications
You must be signed in to change notification settings - Fork 53
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
Introduce stable
tag on containers
#489
Conversation
.github/workflows/main-docker.yml
Outdated
# If the ref is a tag, also tag the image as stable as this is part of a 'release' | ||
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then | ||
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ | ||
-t ${{ env.GHCR_REGISTRY }}/${{ env.IMAGE_NAME }}:stable \ | ||
$(printf '${{ env.GHCR_REGISTRY }}/${{ env.IMAGE_NAME }}@sha256:%s ' *) | ||
|
||
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ | ||
-t ${{ env.DOCKERHUB_REGISTRY }}/${{ env.IMAGE_NAME }}:stable \ | ||
$(printf '${{ env.DOCKERHUB_REGISTRY }}/${{ env.IMAGE_NAME }}@sha256:%s ' *) | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You did quite a bit of bash magic in here. 😎
Does this also handle the case where I push a beta version such as v0.90.7-beta
? In this case we shouldn't tag it as stable
; the stable
tag should remain to v0.90.4
until say v0.90.8
comes along.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah Bash is not my favorite, but it's a power I have lol - and no, that's a good point. I was just catching if there was a new tag pushed. I'm assuming I would just have to catch if there is a -
in the string of the tag that is pushed, to assume that it's not a stable
build?
e.g. don't mark these as stable:
v1.0.0-alpha
v2.24.1-beta
etc...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Closes #488