From fb0f78db0feaf89c62ae448a2ae9219534461650 Mon Sep 17 00:00:00 2001 From: Husky <39809509+Huskydog9988@users.noreply.github.com> Date: Mon, 27 Mar 2023 20:41:15 -0400 Subject: [PATCH] improve tagging of docker image --- .github/workflows/docker-image.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 6af8630b38..b1c7edfec4 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -1,9 +1,8 @@ - name: Create and publish a Docker image on: push: - branches: ['master'] + branches: ["master"] env: REGISTRY: ghcr.io @@ -32,6 +31,16 @@ jobs: uses: docker/metadata-action@v4 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + type=schedule,pattern=nightly + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} + type=ref,event=branch + type=ref,event=pr + type=sha + # set latest tag for stable releases + type=raw,value=latest,enable=${{ github.event.release.prerelease == false }} - name: Build and push Docker image uses: docker/build-push-action@v3