diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 47b35f45..a31cac1d 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -67,9 +67,12 @@ jobs: with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | - type=ref,event=branch,prefix=,suffix=,value=latest - type=ref,event=tag - type=sha,format=short + type=ref,event=branch + type=ref,event=pr + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} + type=raw,value=latest,enable={{is_default_branch}} # Build and push Docker image with Buildx (don't push on PR) # https://github.com/docker/build-push-action @@ -99,5 +102,4 @@ jobs: DIGEST: ${{ steps.build-and-push.outputs.digest }} # This step uses the identity token to provision an ephemeral certificate # against the sigstore community Fulcio instance. - run: | - echo "${TAGS}" | grep -v "latest" | xargs -I {} cosign sign --yes {}@${DIGEST} + run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}