From b04fc53f65bdde8cde8fdfeccb92787b35ec260d Mon Sep 17 00:00:00 2001 From: Robbie Blaine Date: Mon, 8 Apr 2024 17:39:15 +0200 Subject: [PATCH] Docker tag `latest` if default branch or release --- .github/workflows/cicd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 7de31f16b..194d2dd3c 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -170,7 +170,7 @@ jobs: with: images: ${{ env.REGISTRY }}/${{ matrix.image }} tags: | - type=raw,value=latest,enable=${{ github.ref == 'refs/heads/master' }} + type=raw,value=latest,enable=${{ github.event.repository.default_branch == github.ref_name || github.event_name == 'release'}} type=sha,prefix=pr-${{ github.event.pull_request.number }}-,priority=601,enable=${{ github.event_name == 'pull_request' }} type=sha,prefix={{branch}}-,priority=601,enable=${{ github.event_name != 'pull_request' && github.event_name != 'release' }} type=ref,event=branch,priority=600