Skip to content

Commit

Permalink
fix version tag.
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Benusovich <[email protected]>
  • Loading branch information
dbenusov committed Nov 5, 2024
1 parent 6ea8f10 commit 6655f63
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions .github/workflows/deploy-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,13 @@ jobs:
# Use Docker `latest` tag convention
[ "$VERSION" == "main" ] && VERSION=latest
echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION
# Use the commit SHA for a unique image tag
IMAGE_TAG=${{ github.sha }}
# You can also limit the tag length if needed
SHORT_IMAGE_TAG=$(echo "$IMAGE_TAG" | cut -c1-8) # Use the first 8 characters
echo TAG=$SHORT_IMAGE_TAG
docker tag image $IMAGE_ID:$SHORT_IMAGE_TAG
docker push $IMAGE_ID:$SHORT_IMAGE_TAG
Expand All @@ -136,10 +136,14 @@ jobs:
- name: 'Deploy'
id: 'deploy'
run: |-
# Use the commit SHA for a unique image tag
IMAGE_TAG=${{ github.sha }}
# You can also limit the tag length if needed
SHORT_IMAGE_TAG=$(echo "$IMAGE_TAG" | cut -c1-8) # Use the first 8 characters
gcloud components install beta --quiet
gcloud run deploy basic-server \
--image=docker.io/flyingmonkeys1996/collision-mapper:$IMAGE_TAG \
--image=docker.io/flyingmonkeys1996/collision-mapper:$SHORT_IMAGE_TAG \
--allow-unauthenticated \
--port=8080 \
--service-account=320300059816-compute@developer.gserviceaccount.com \
Expand Down Expand Up @@ -167,10 +171,14 @@ jobs:
- id: 'gcloud'
name: 'gcloud'
run: |-
# Use the commit SHA for a unique image tag
IMAGE_TAG=${{ github.sha }}
# You can also limit the tag length if needed
SHORT_IMAGE_TAG=$(echo "$IMAGE_TAG" | cut -c1-8) # Use the first 8 characters
gcloud components install beta --quiet
gcloud run deploy data-analyzer \
--image=docker.io/flyingmonkeys1996/collision-mapper:$IMAGE_TAG \
--image=docker.io/flyingmonkeys1996/collision-mapper:$SHORT_IMAGE_TAG \
--allow-unauthenticated \
--port=8080 \
--service-account=320300059816-compute@developer.gserviceaccount.com \
Expand Down Expand Up @@ -198,10 +206,14 @@ jobs:
- id: 'gcloud'
name: 'gcloud'
run: |-
# Use the commit SHA for a unique image tag
IMAGE_TAG=${{ github.sha }}
# You can also limit the tag length if needed
SHORT_IMAGE_TAG=$(echo "$IMAGE_TAG" | cut -c1-8) # Use the first 8 characters
gcloud components install beta --quiet
gcloud run deploy data-collector \
--image=docker.io/flyingmonkeys1996/collision-mapper:$IMAGE_TAG \
--image=docker.io/flyingmonkeys1996/collision-mapper:$SHORT_IMAGE_TAG \
--allow-unauthenticated \
--port=8080 \
--service-account=320300059816-compute@developer.gserviceaccount.com \
Expand Down

0 comments on commit 6655f63

Please sign in to comment.