Skip to content

Commit

Permalink
Use the released tag version to identify newly-created docker images
Browse files Browse the repository at this point in the history
  • Loading branch information
m-Peter committed Sep 26, 2024
1 parent 888c69d commit 145578f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ on:
- '*'

env:
DOCKER_IMAGE_URL: ${{ vars.REPO_DOCKER_IMAGE_URL }}:${{ github.sha }}
GATEWAY_VERSION: $(git describe --tags --abbrev=0 2>/dev/null)
DOCKER_IMAGE_URL: ${{ vars.REPO_DOCKER_IMAGE_URL }}:${{ env.GATEWAY_VERSION }}

jobs:
build:
Expand Down Expand Up @@ -36,5 +37,5 @@ jobs:
- name: Docker Auth
run: |-
gcloud auth configure-docker ${{ vars.GAR_LOCATION }}-docker.pkg.dev
docker build -t ${{ env.DOCKER_IMAGE_URL }} --build-arg GATEWAY_VERSION=$(git describe --tags --abbrev=0 2>/dev/null) --file Dockerfile .
docker build -t ${{ env.DOCKER_IMAGE_URL }} --build-arg GATEWAY_VERSION=${{ env.GATEWAY_VERSION }} --file Dockerfile .
docker push ${{ env.DOCKER_IMAGE_URL }}

0 comments on commit 145578f

Please sign in to comment.