File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed
Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -11,15 +11,22 @@ jobs:
1111 steps :
1212 - uses : actions/checkout@v3
1313
14+ - name : Set up QEMU
15+ uses : docker/setup-qemu-action@v3
16+
17+ - name : Set up Docker Buildx
18+ uses : docker/setup-buildx-action@v3
19+
1420 - name : Login to GitHub Container Registry
1521 uses : docker/login-action@v1
1622 with :
1723 registry : ghcr.io
1824 username : ${{ github.actor }}
1925 password : ${{ secrets.GITHUB_TOKEN }}
2026
21- - name : Build and push DVWA image
27+ - name : Build and push multi-arch DVWA image
2228 run : |
29+
2330 IMAGE_ID=ghcr.io/${{ github.repository_owner }}/dvwa
2431 IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
2532 VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
2936 echo IMAGE_ID=$IMAGE_ID
3037 echo VERSION=$VERSION
3138 echo COMMIT=$COMMIT
32- docker image build --tag dvwa .
33- docker image tag dvwa $IMAGE_ID:$VERSION
34- docker image tag dvwa $IMAGE_ID:$COMMIT
35- docker image push $IMAGE_ID:$VERSION
36- docker image push $IMAGE_ID:$COMMIT
39+
40+ docker buildx build --platform linux/amd64,linux/arm64 \
41+ --tag $IMAGE_ID:$VERSION \
42+ --tag $IMAGE_ID:$COMMIT \
43+ --push .
44+
You can’t perform that action at this time.
0 commit comments