chore(release): add latest tag only on release tags (#766)

This commit is contained in:
Ronny Moreas 2023-03-25 22:12:49 +01:00 committed by GitHub
parent d276cd2902
commit 10d640b211
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -56,11 +56,12 @@ jobs:
uses: docker/metadata-action@v4 uses: docker/metadata-action@v4
with: with:
images: ghcr.io/${{ github.repository }}${{ matrix.image.suffix }} images: ghcr.io/${{ github.repository }}${{ matrix.image.suffix }}
flavor: latest=true flavor: latest=false
tags: | tags: |
type=raw,value=canary,enable=${{ github.ref == format('refs/heads/{0}', 'main') }} type=raw,value=canary,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
type=ref,event=pr type=ref,event=pr
type=semver,pattern={{raw}} type=semver,pattern={{raw}}
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') }}
- name: Login to GitHub Container Registry - name: Login to GitHub Container Registry
uses: docker/login-action@v1 uses: docker/login-action@v1