@@ -46,17 +46,17 @@ jobs:
4646 password : ${{ secrets.GITHUB_TOKEN }}
4747
4848 - name : Build and push amd64
49- uses : docker/build-push-action@v6
50- with :
51- context : .
52- push : true
53- platforms : linux/amd64
54- tags : ghcr.io/${{ github.repository }}:sha-${{ github.sha }}- amd64
55- cache-from : type=gha,scope=amd64
56- cache-to : type=gha,mode=max,scope=amd64
57- build-args : |
58- JWT_SECRET=change-me-in-production
59- BACKEND_URL=http://localhost:8000
49+ run : |
50+ REPO=$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]')
51+ docker buildx build \
52+ --platform linux/amd64 \
53+ --push \
54+ --cache-from type=gha,scope= amd64 \
55+ -- cache-to type=gha,mode=max, scope=amd64 \
56+ --build-arg JWT_SECRET=change-me-in-production \
57+ -- build-arg BACKEND_URL=http://localhost:8000 \
58+ --tag ghcr.io/${REPO}:sha-${{ github.sha }}-amd64 \
59+ .
6060
6161 build-arm64 :
6262 needs : check-release
@@ -79,17 +79,17 @@ jobs:
7979 password : ${{ secrets.GITHUB_TOKEN }}
8080
8181 - name : Build and push arm64
82- uses : docker/build-push-action@v6
83- with :
84- context : .
85- push : true
86- platforms : linux/arm64
87- tags : ghcr.io/${{ github.repository }}:sha-${{ github.sha }}- arm64
88- cache-from : type=gha,scope=arm64
89- cache-to : type=gha,mode=max,scope=arm64
90- build-args : |
91- JWT_SECRET=change-me-in-production
92- BACKEND_URL=http://localhost:8000
82+ run : |
83+ REPO=$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]')
84+ docker buildx build \
85+ --platform linux/arm64 \
86+ --push \
87+ --cache-from type=gha,scope= arm64 \
88+ -- cache-to type=gha,mode=max, scope=arm64 \
89+ --build-arg JWT_SECRET=change-me-in-production \
90+ -- build-arg BACKEND_URL=http://localhost:8000 \
91+ --tag ghcr.io/${REPO}:sha-${{ github.sha }}-arm64 \
92+ .
9393
9494 merge-manifest :
9595 needs : [build-amd64, build-arm64]
@@ -107,8 +107,9 @@ jobs:
107107
108108 - name : Create and push multi-platform manifest
109109 run : |
110+ REPO=$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]')
110111 docker buildx imagetools create \
111- --tag ghcr.io/${{ github.repository } }:latest \
112- --tag ghcr.io/${{ github.repository } }:sha-${{ github.sha }} \
113- ghcr.io/${{ github.repository } }:sha-${{ github.sha }}-amd64 \
114- ghcr.io/${{ github.repository } }:sha-${{ github.sha }}-arm64
112+ --tag ghcr.io/${REPO }:latest \
113+ --tag ghcr.io/${REPO }:sha-${{ github.sha }} \
114+ ghcr.io/${REPO }:sha-${{ github.sha }}-amd64 \
115+ ghcr.io/${REPO }:sha-${{ github.sha }}-arm64
0 commit comments