From c7850fe18f1d45010c5f0dc9f4f2b0e1ccc35706 Mon Sep 17 00:00:00 2001 From: Sylvain Huguet Date: Fri, 15 Mar 2024 00:40:39 +0100 Subject: [PATCH] Tweaking the metadata/image tagging mechanism --- .github/workflows/docker-image.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/docker-image.yaml b/.github/workflows/docker-image.yaml index 4490f0a2..60e0c52e 100644 --- a/.github/workflows/docker-image.yaml +++ b/.github/workflows/docker-image.yaml @@ -55,6 +55,15 @@ jobs: uses: docker/metadata-action@v5 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + type=schedule + type=ref,event=branch + type=ref,event=pr + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}},enable=${{ !startsWith(github.ref, 'refs/tags/v0.') }} + type=sha + type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }} # This step uses the `docker/build-push-action` action to build the # image, based on your repository's `Dockerfile`. If the build succeeds,