Skip to content

Commit 3ee7373

Browse files
authored
Fix latest tag push with retag (#98)
* retag and push * test * test * utilmate fix * ready to merge
1 parent d622753 commit 3ee7373

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

.github/actions/build-push-images/action.yaml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,13 @@ runs:
6363
shell: bash
6464
env:
6565
REGISTRY: ${{ inputs.registry }}
66-
TAG: latest
66+
TAG: ${{ inputs.tag }}
6767
run: |
68-
echo "Pushing images to registry..."
69-
docker compose -f ${{ inputs.compose-file }} build
70-
docker compose -f ${{ inputs.compose-file }} push
71-
echo "Successfully pushed all images with tag: $TAG"
68+
echo "Pushing images with latest to registry..."
69+
images=$(docker compose -f ${{ inputs.compose-file }} config --images)
70+
for image in $images; do
71+
image_name=$(echo "$image" | cut -d: -f1)
72+
docker tag "${image}" "${image_name}":latest
73+
docker push "${image_name}":latest
74+
done
75+
echo "Push $TAG as new latest completed."

0 commit comments

Comments
 (0)