diff --git a/.github/workflows/build-release.yaml b/.github/workflows/build-release.yaml index d38fe058..2c9e1bef 100644 --- a/.github/workflows/build-release.yaml +++ b/.github/workflows/build-release.yaml @@ -2,6 +2,8 @@ name: Build release on: release: + tags: + - 'v*' types: - created @@ -25,8 +27,11 @@ jobs: uses: docker/metadata-action@v4 with: images: ghcr.io/${{ github.repository }} - flavor: latest=true # adds :latest tag to outputs.tags - tags: type=sha,format=long,prefix= # adds : output to outputs.tags + flavor: latest=false + tags: | + type=raw,value=latest,enable={{is_default_branch}} + type=raw,value=stable,enable=${{startsWith(github.ref, 'refs/tags/v')}} + type=ref,event=tag - name: Build and push uses: docker/build-push-action@v2