From 613d5c55d44685b6dc40af204494ec98dd441e9d Mon Sep 17 00:00:00 2001 From: Quentin Kaiser Date: Tue, 30 Jan 2024 11:02:45 +0100 Subject: [PATCH] fix(ci): use unique artifacts names. --- .github/workflows/build-publish-image.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-publish-image.yml b/.github/workflows/build-publish-image.yml index d8d277402c..8a325bf957 100644 --- a/.github/workflows/build-publish-image.yml +++ b/.github/workflows/build-publish-image.yml @@ -18,6 +18,11 @@ jobs: - linux/amd64 - linux/arm64 steps: + - name: Prepare + run: | + platform=${{ matrix.platform }} + echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV + - name: Checkout source code uses: actions/checkout@v4 @@ -39,6 +44,7 @@ jobs: type=raw,value=latest,enable={{is_default_branch}} type=ref,event=branch type=sha + - name: Set up QEMU uses: docker/setup-qemu-action@v3 @@ -94,7 +100,7 @@ jobs: - name: Upload digest uses: actions/upload-artifact@v4 with: - name: ${{ matrix.platform }}-digests + name: digest-${{ env.PLATFORM_PAIR }} path: /tmp/digests/* if-no-files-found: error retention-days: 1 @@ -107,21 +113,30 @@ jobs: - name: Download digests uses: actions/download-artifact@v4 with: - name: digests path: /tmp/digests + pattern: digest-* + merge-multiple: true + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + - name: Docker meta id: meta uses: docker/metadata-action@v5 with: images: ${{ env.DOCKER_IMAGE }} + tags: | + type=raw,value=latest,enable={{is_default_branch}} + type=ref,event=branch + type=sha + - name: Login to GitHub Container Registry uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Create manifest list and push working-directory: /tmp/digests run: |