From 41d0c01a887d81817a24456bc28b332aa5dcb72c Mon Sep 17 00:00:00 2001 From: garder500 Date: Tue, 28 Oct 2025 18:43:25 +0100 Subject: Modifier les balises de métadonnées Docker pour inclure l'architecture et ajuster la création de manifestes multi-architecture. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d9548ab..78323d7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -109,10 +109,9 @@ jobs: with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | - type=ref,event=branch - type=ref,event=pr - type=sha,prefix={{branch}}- - type=raw,value=latest,enable={{is_default_branch}} + type=ref,event=branch,suffix=-${{ matrix.arch }} + type=ref,event=pr,suffix=-${{ matrix.arch }} + type=sha,prefix={{branch}}-,suffix=-${{ matrix.arch }} - name: Build and push Docker image uses: docker/build-push-action@v5 @@ -153,12 +152,14 @@ jobs: BRANCH=${GITHUB_REF##*/} SHA_SHORT=$(echo $GITHUB_SHA | cut -c1-7) - # Create manifest for branch tag + # Create manifest for branch tag (combines amd64 and arm64) docker buildx imagetools create -t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${BRANCH} \ - ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${BRANCH}-${SHA_SHORT} + ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${BRANCH}-${SHA_SHORT}-amd64 \ + ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${BRANCH}-${SHA_SHORT}-arm64 # Create manifest for latest tag if on default branch if [ "${{ github.ref }}" = "refs/heads/main" ] || [ "${{ github.ref }}" = "refs/heads/master" ]; then docker buildx imagetools create -t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest \ - ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${BRANCH}-${SHA_SHORT} + ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${BRANCH}-${SHA_SHORT}-amd64 \ + ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${BRANCH}-${SHA_SHORT}-arm64 fi -- cgit v1.2.3