Skip to content

Commit

Permalink
add a semantic version tag to the Docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
briskt authored Sep 21, 2024
1 parent f9f1499 commit 283b005
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ jobs:
with:
images: ${{ vars.DOCKER_ORG }}/${{ github.event.repository.name }}
tags: |
type=ref,event=branch
type=ref,event=tag
# set latest tag for master branch
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
# set 'latest' tag for main branch
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
- name: Build and push Docker image
Expand Down

0 comments on commit 283b005

Please sign in to comment.