From 97d7a2666f940a2b52892bc172bca1f3aa71609d Mon Sep 17 00:00:00 2001 From: Andres Uribe Date: Thu, 15 Jun 2023 15:08:12 -0400 Subject: [PATCH] Push on release tags --- .github/workflows/image-publish.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/image-publish.yml b/.github/workflows/image-publish.yml index 1c71def0d..29d12d1ef 100644 --- a/.github/workflows/image-publish.yml +++ b/.github/workflows/image-publish.yml @@ -12,6 +12,8 @@ name: Create and publish a Docker images on: push: branches: ['main'] + tags: + - 'v*.*.*' env: REGISTRY: ghcr.io @@ -38,9 +40,17 @@ jobs: - name: Extract metadata (tags, labels) for Docker id: meta - uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 + uses: docker/metadata-action@v4 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}} + type=sha - name: Build and push Docker image uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc @@ -49,4 +59,4 @@ jobs: file: build/Dockerfile push: true tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file + labels: ${{ steps.meta.outputs.labels }}