1111jobs :
1212 build-and-push :
1313 name : Build and Push Docker Images
14- runs-on : ubuntu-latest
14+ runs-on : ${{ matrix.runner }}
1515 permissions :
1616 contents : read
1717 packages : write
18-
1918 strategy :
19+ fail-fast : false
2020 matrix :
21- target :
22- - niluv_node
21+ include :
22+ - arch : amd64
23+ platform : linux/amd64
24+ runner : ubuntu-latest
25+ - arch : arm64
26+ platform : linux/arm64
27+ runner : ubuntu-24.04-arm
2328 steps :
2429 - name : Checkout
2530 uses : actions/checkout@v4
2631 with :
27- submodules : recursive
28-
29- - name : Set up QEMU
30- uses : docker/setup-qemu-action@v3
31- with :
32- platforms : linux/arm64
32+ fetch-depth : 0
3333
3434 - name : Set up Docker Buildx
3535 uses : docker/setup-buildx-action@v3
@@ -45,24 +45,23 @@ jobs:
4545 id : meta
4646 uses : docker/metadata-action@v5
4747 with :
48- images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/${{ matrix.target }}
48+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/niluv_node
4949 tags : |
5050 type=semver,pattern={{version}}
5151 type=semver,pattern={{major}}.{{minor}}
5252 type=semver,pattern={{major}}
5353 type=sha,prefix=sha-
5454 type=raw,value=latest,enable={{is_default_branch}}
5555
56- - name : Build and push Docker image (${{ matrix.target }})
56+ - name : Build and push Docker image
5757 id : build
5858 uses : docker/build-push-action@v5
5959 with :
6060 context : .
61- file : ./docker/Dockerfile
62- target : ${{ matrix.target }}
61+ file : ./docker/niluv_node.dockerfile
6362 push : true
6463 tags : ${{ steps.meta.outputs.tags }}
6564 labels : ${{ steps.meta.outputs.labels }}
66- cache-from : type=gha,scope=${{ matrix.target }}
67- cache-to : type=gha,mode=max,scope=${{ matrix.target }}
68- platforms : linux/amd64,linux/arm64
65+ cache-from : type=gha
66+ cache-to : type=gha,mode=max
67+ provenance : false
0 commit comments