Skip to content

Commit

Permalink
Improve image tagging in CI/CD workflow
Browse files Browse the repository at this point in the history
The continuous integration/continuous delivery workflow's image tagging strategy has been updated for better consistency and accuracy. Tag types for branch events have been switched from referencing 'ref' to 'sha', allowing for more precise event tracking across different triggers in the repository.
  • Loading branch information
CreatedByBdr committed Feb 8, 2024
1 parent 2bd00ab commit 361a7ce
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.GAR }}/${{ env.GCP_Project_ID }}/${{ env.Project }}/${{ github.head_ref && 'feature' || github.ref_name }}
images: ${{ env.GAR }}/${{ env.GCP_Project_ID }}/${{ env.Project }}/${{ github.head_ref && 'feature' || startsWith(github.event.ref, 'refs/tags/v') && github.event.repository.default_branch || github.ref_name }}
flavor: latest=false
tags: |
type=sha,event=branch
Expand All @@ -54,4 +54,10 @@ jobs:
file: Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
labels: ${{ steps.meta.outputs.labels }}




# europe-west9-docker.pkg.dev/gol2-production/gol2-indexer/dev:v0.0.2
# europe-west9-docker.pkg.dev/gol2-production/gol2-indexer/v0.0.3:sha-2bd00ab

0 comments on commit 361a7ce

Please sign in to comment.