From bb83ee844eac335543ef849f65105be8a90b7fb6 Mon Sep 17 00:00:00 2001 From: zyoshoka <107108195+zyoshoka@users.noreply.github.com> Date: Fri, 16 Feb 2024 15:58:54 +0900 Subject: [PATCH] fix(ci): publish docker image fails (3) (#13327) * fix(ci): publish docker image fails (3) * fix: set `tags` --- .github/workflows/docker-develop.yml | 1 - .github/workflows/docker.yml | 17 +++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/docker-develop.yml b/.github/workflows/docker-develop.yml index 8b85cf2ecf..cb84849580 100644 --- a/.github/workflows/docker-develop.yml +++ b/.github/workflows/docker-develop.yml @@ -43,7 +43,6 @@ jobs: push: true platforms: ${{ matrix.platform }} provenance: false - tags: ${{ env.REGISTRY_IMAGE }}:develop labels: develop cache-from: type=gha cache-to: type=gha,mode=max diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 42acc0ce8a..23c1bdbc16 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -7,6 +7,13 @@ on: env: REGISTRY_IMAGE: misskey/misskey + TAGS: | + type=edge + type=ref,event=pr + type=ref,event=branch + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} jobs: # see https://docs.docker.com/build/ci/github-actions/multi-platform/#distribute-build-across-multiple-runners @@ -33,13 +40,7 @@ jobs: uses: docker/metadata-action@v5 with: images: ${{ env.REGISTRY_IMAGE }} - tags: | - type=edge - type=ref,event=pr - type=ref,event=branch - type=semver,pattern={{version}} - type=semver,pattern={{major}}.{{minor}} - type=semver,pattern={{major}} + tags: ${{ env.TAGS }} - name: Log in to Docker Hub uses: docker/login-action@v3 with: @@ -53,7 +54,6 @@ jobs: push: true platforms: ${{ matrix.platform }} provenance: false - tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha cache-to: type=gha,mode=max @@ -89,6 +89,7 @@ jobs: uses: docker/metadata-action@v5 with: images: ${{ env.REGISTRY_IMAGE }} + tags: ${{ env.TAGS }} - name: Login to Docker Hub uses: docker/login-action@v3 with: