From b8f71af77c058eae1609cbc6798e665e70b0dda7 Mon Sep 17 00:00:00 2001 From: Domingo Dirutigliano Date: Mon, 4 Aug 2025 12:03:33 +0200 Subject: [PATCH] fixing workflows --- .github/workflows/docker-image.yml | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index ae6fb84..3cbcb08 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -71,7 +71,7 @@ jobs: builder: ${{ steps.buildx.outputs.name }} platforms: linux/${{ matrix.arch }} push: true - tags: ${{ steps.meta.outputs.tags }}-${{ matrix.arch }} + tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.tag.outputs.TAG_NAME }}-${{ matrix.arch }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha,scope=${{ matrix.arch }} cache-to: type=gha,mode=max,scope=${{ matrix.arch }} @@ -91,19 +91,23 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + - name: Extract tag name + id: tag + run: echo TAG_NAME=$(echo $GITHUB_REF | cut -d / -f 3) >> $GITHUB_OUTPUT - name: Create and push multi-platform manifest run: | - # Create manifest list - docker manifest create ${{ steps.meta.outputs.tags }} \ - ${{ steps.meta.outputs.tags }}-amd64 \ - ${{ steps.meta.outputs.tags }}-arm64 - docker manifest push ${{ steps.meta.outputs.tags }} + # Create manifest list for specific tag + docker manifest create ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.tag.outputs.TAG_NAME }} \ + ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.tag.outputs.TAG_NAME }}-amd64 \ + ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.tag.outputs.TAG_NAME }}-arm64 + docker manifest push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.tag.outputs.TAG_NAME }} + + # Create manifest list for latest tag + docker manifest create ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest \ + ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.tag.outputs.TAG_NAME }}-amd64 \ + ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.tag.outputs.TAG_NAME }}-arm64 + docker manifest push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest create-rootfs-assets: runs-on: ubuntu-latest