fix(ci): add fallback to 'latest' when TAG_NAMES is empty in DockerHub push logic
This commit is contained in:
parent
0cf1dd9b04
commit
97ee055c69
4
.github/workflows/build-base-images.yml
vendored
4
.github/workflows/build-base-images.yml
vendored
@ -128,6 +128,10 @@ jobs:
|
||||
docker pull "$ORIGIN_IMG"
|
||||
|
||||
for TAG in $TAG_NAMES; do
|
||||
if [ -z "$TAGS" ]; then
|
||||
echo "TAG_NAMES is empty, falling back to 'latest'"
|
||||
TAGS="latest"
|
||||
fi
|
||||
docker tag "$ORIGIN_IMG" "$TARGET_REPO:$TAG"
|
||||
docker push "$TARGET_REPO:$TAG"
|
||||
done
|
||||
|
||||
4
.github/workflows/build-service-images.yml
vendored
4
.github/workflows/build-service-images.yml
vendored
@ -163,6 +163,10 @@ jobs:
|
||||
docker pull "$ORIGIN_IMG"
|
||||
|
||||
for TAG in $TAG_NAMES; do
|
||||
if [ -z "$TAGS" ]; then
|
||||
echo "TAG_NAMES is empty, falling back to 'latest'"
|
||||
TAGS="latest"
|
||||
fi
|
||||
docker tag "$ORIGIN_IMG" "$TARGET_REPO:$TAG"
|
||||
docker push "$TARGET_REPO:$TAG"
|
||||
done
|
||||
|
||||
Loading…
Reference in New Issue
Block a user