Skip to content

Commit

Permalink
Latest Tag for GAR (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
kozlov721 authored Sep 26, 2024
1 parent 9eabe12 commit 972ea22
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,16 @@ jobs:
docker build -f $DOCKERFILE -t $NAME:latest .
VERSION=${{ steps.commit.outputs.sha }}
GAR_TAG="$GAR_LOCATION-docker.pkg.dev/$PROJECT_ID/internal/$STEM:$VERSION"
GAR_NAME="$GAR_LOCATION-docker.pkg.dev/$PROJECT_ID/internal/$STEM"
docker tag $NAME:latest $GAR_TAG
docker push $GAR_TAG
for tag in latest $VERSION; do
docker tag "$NAME:latest" "$GAR_NAME:$tag"
docker push "$GAR_NAME:$tag"
done
IFS=' ' read -r -a REPO_ARRAY <<< "${{ vars.EXTERNAL_CLIENTS }}"
for REPO in "${REPO_ARRAY[@]}"; do
GAR_CLIENT_TAG="$GAR_LOCATION-docker.pkg.dev/$PROJECT_ID/$REPO/$STEM:$VERSION"
docker tag $GAR_TAG $GAR_CLIENT_TAG
docker push $GAR_CLIENT_TAG
docker tag "$NAME:latest" "$GAR_CLIENT_TAG"
docker push "$GAR_CLIENT_TAG"
done

0 comments on commit 972ea22

Please sign in to comment.