summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgarder500 <jeremy27.clara22@gmail.com>2025-10-28 18:43:25 +0100
committergarder500 <jeremy27.clara22@gmail.com>2025-10-28 18:43:25 +0100
commit41d0c01a887d81817a24456bc28b332aa5dcb72c (patch)
treeea6949b31bfde45dca78c56b8cb4c1a2014dd7fa
parent6e1964802e79ff0de87b3bae903e04ef400e1202 (diff)
Modifier les balises de métadonnées Docker pour inclure l'architecture et ajuster la création de manifestes multi-architecture.
-rw-r--r--.github/workflows/build.yml15
1 files changed, 8 insertions, 7 deletions
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