@@ -14,34 +14,16 @@ jobs:
1414 runs-on : ubuntu-latest
1515 permissions :
1616 contents : read
17- packages : write
18- outputs :
19- linux-image : ${{ steps.meta.outputs.tags }}
2017 steps :
21- - name : Set up Docker Buildx
22- uses : docker/setup-buildx-action@v3
23-
24- - name : Login to GitHub Container Registry
25- uses : docker/login-action@v3
18+ - uses : actions/checkout@v4
19+ - uses : nixbuild/nix-quick-install-action@v30
20+ - name : Restore and save Nix store
21+ uses : nix-community/cache-nix-action@v6
2622 with :
27- registry : ${{ env.REGISTRY }}
28- username : ${{ github.actor }}
29- password : ${{ secrets.GITHUB_TOKEN }}
30-
31- - name : Docker meta
32- id : meta
33- uses : docker/metadata-action@v5
34- with :
35- images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-linux
36-
37- - name : Build
38- uses : docker/build-push-action@v5
39- with :
40- push : ${{ github.event_name != 'pull_request' }}
41- tags : ${{ steps.meta.outputs.tags }}
42- target : linux-build
43- cache-from : type=gha
44- cache-to : type=gha,mode=max
23+ primary-key : nix-${{ runner.os }}
24+ gc-max-store-size : 1G
25+ - name : Nix Build
26+ run : nix build '.#kernel'
4527
4628 build :
4729 runs-on : ubuntu-latest
@@ -53,19 +35,36 @@ jobs:
5335 matrix :
5436 os :
5537 - version : ' 2.15.1.1189'
56- target : qemu -toltec
57- - version : ' 3.3.2.1666'
58- target : qemu-toltec
59- - version : ' 3.5.2.1807'
60- target : qemu-toltec
61- - version : ' 3.8.2.1965'
62- target : qemu-toltec
63- - version : ' 3.20.0.92'
64- target : qemu-toltec
38+ target : nix -toltec
39+ # - version: '3.3.2.1666'
40+ # target: qemu-toltec
41+ # - version: '3.5.2.1807'
42+ # target: qemu-toltec
43+ # - version: '3.8.2.1965'
44+ # target: qemu-toltec
45+ # - version: '3.20.0.92'
46+ # target: qemu-toltec
6547
6648 steps :
6749 - name : Set up Docker Buildx
6850 uses : docker/setup-buildx-action@v3
51+ with :
52+ # Have to use docker as we load an external image.
53+ # Prevents using cache
54+ driver : docker
55+
56+ - uses : actions/checkout@v4
57+ - uses : nixbuild/nix-quick-install-action@v30
58+ - name : Restore and save Nix store
59+ uses : nix-community/cache-nix-action@v6
60+ with :
61+ primary-key : nix-${{ runner.os }}
62+ gc-max-store-size : 3G
63+
64+ - name : Nix Build
65+ run : |
66+ nix build '.#"docker-${{ matrix.os.version }}"'
67+ ./result | docker image load
6968
7069 - name : Login to GitHub Container Registry
7170 uses : docker/login-action@v3
@@ -89,10 +88,10 @@ jobs:
8988 push : ${{ github.event_name != 'pull_request' && github.ref_name == 'main' }}
9089 tags : ${{ steps.meta.outputs.tags }}
9190 target : ${{ matrix.os.target }}
92- cache-from : type=gha
93- cache-to : type=gha,mode=max
91+ # cache-from: type=gha
92+ # cache-to: type=gha,mode=max
93+ # linux_image=${{ needs.build-linux.outputs.linux-image }}
9494 build-args : |
9595 fw_version=${{ matrix.os.version }}
96- linux_image=${{ needs.build-linux.outputs.linux-image }}
9796
9897
0 commit comments