@@ -3,6 +3,8 @@ name: docker-build-push
33on :
44 push :
55 tags : [ "v*.*.*" ]
6+ # TODO
7+ pull_request :
68 workflow_dispatch :
79env :
810 REGISTRY : ghcr.io
1113jobs :
1214 build-and-push :
1315 name : Build and Push Docker Images
14- runs-on : ubuntu-latest
16+ runs-on : ${{ matrix.runner }}
1517 permissions :
1618 contents : read
1719 packages : write
18-
1920 strategy :
21+ fail-fast : false
2022 matrix :
21- target :
22- - niluv_node
23+ include :
24+ - arch : amd64
25+ platform : linux/amd64
26+ runner : ubuntu-latest
27+ - arch : arm64
28+ platform : linux/arm64
29+ runner : ubuntu-24.04-arm
2330 steps :
2431 - name : Checkout
2532 uses : actions/checkout@v4
2633 with :
27- submodules : recursive
28-
29- - name : Set up QEMU
30- uses : docker/setup-qemu-action@v3
31- with :
32- platforms : linux/arm64
34+ fetch-depth : 0
3335
3436 - name : Set up Docker Buildx
3537 uses : docker/setup-buildx-action@v3
@@ -45,24 +47,25 @@ jobs:
4547 id : meta
4648 uses : docker/metadata-action@v5
4749 with :
48- images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/${{ matrix.target }}
50+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/niluv_node
4951 tags : |
5052 type=semver,pattern={{version}}
5153 type=semver,pattern={{major}}.{{minor}}
5254 type=semver,pattern={{major}}
5355 type=sha,prefix=sha-
5456 type=raw,value=latest,enable={{is_default_branch}}
5557
56- - name : Build and push Docker image (${{ matrix.target }})
58+ - name : Build and push Docker image
5759 id : build
5860 uses : docker/build-push-action@v5
5961 with :
6062 context : .
61- file : ./docker/Dockerfile
62- target : ${{ matrix.target }}
63- push : true
63+ file : ./docker/niluv_node.dockerfile
64+ # TODO
65+ # push: true
66+ push : false
6467 tags : ${{ steps.meta.outputs.tags }}
6568 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
69+ cache-from : type=gha
70+ cache-to : type=gha,mode=max
71+ provenance : false
0 commit comments