-
Notifications
You must be signed in to change notification settings - Fork 177
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
Make the tools/merge-docker-images.sh
script more generic
#2334
base: master
Are you sure you want to change the base?
Conversation
@@ -59,7 +59,7 @@ jobs: | |||
|
|||
- name: Merge images | |||
run: | | |||
./tools/merge-docker-images.sh $GITHUB_SHA | |||
./tools/merge-docker-images.sh clockworklabs/spacetimedb "commit-${GITHUB_SHA:0:7}" "${GITHUB_SHA:0:7}-full" |
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.
the first param should match what used to be hardcoded in the original script below
the second param should match the old definition of TAG
in the original script below
the third param should match the old definition of FULL_TAG
in the original script below
0b688d9
to
bd85d27
Compare
@@ -1,5 +1,6 @@ | |||
#!/bin/bash | |||
set -e | |||
set -u |
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.
this is new (not copied from anywhere), but since I added more params I wanted to add this so that the script behaves more predictably if one of the params isn't provided
@@ -36,6 +37,8 @@ docker manifest annotate "${IMAGE_NAME}":$FULL_TAG \ | |||
|
|||
docker manifest push "${IMAGE_NAME}":$FULL_TAG | |||
|
|||
# if undefined, use the empty string | |||
GITHUB_REF="${GITHUB_REF-}" |
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.
we have a version of this script floating around that uses a [ -n "${GITHUB_REF" ]
check. I'm not sure when that comes up, but just in case we do have undefined GITHUB_REF
I wanted to do this so that the script doesn't fail in a surprising way.
Description of Changes
This is a non-functional change to make the
tools/merge-docker-images.sh
script more generic/flexible.This PR is a series of small (stacking) changes:
sanitize_docker_ref
set -u
API and ABI breaking changes
This does not change code.
Expected complexity level and risk
1
Testing