diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml index 4237f6f..fbc0976 100644 --- a/.github/workflows/build-and-publish.yml +++ b/.github/workflows/build-and-publish.yml @@ -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