|
12 | 12 |
|
13 | 13 | permissions: |
14 | 14 | contents: read |
15 | | - id-token: write |
16 | 15 |
|
17 | 16 | concurrency: |
18 | 17 | group: ${{ github.workflow }}-${{ github.ref }} |
@@ -46,12 +45,17 @@ jobs: |
46 | 45 |
|
47 | 46 | - name: Install Nix |
48 | 47 | uses: DeterminateSystems/nix-installer-action@main |
49 | | - |
50 | | - - name: Enable Magic Nix Cache |
51 | | - uses: DeterminateSystems/magic-nix-cache-action@main |
52 | | - |
53 | | - - name: Build package |
54 | | - run: nix build ".#packages.${{ matrix.target.system }}.${{ matrix.package }}" --no-link --no-update-lock-file |
| 48 | + with: |
| 49 | + extra-conf: | |
| 50 | + accept-flake-config = true |
| 51 | +
|
| 52 | + - name: Build and upload package |
| 53 | + env: |
| 54 | + CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} |
| 55 | + run: | |
| 56 | + : "${CACHIX_AUTH_TOKEN:?CACHIX_AUTH_TOKEN is required to upload to Cachix}" |
| 57 | + nix run --inputs-from . nixpkgs#cachix -- watch-exec openshell -- \ |
| 58 | + nix build ".#packages.${{ matrix.target.system }}.${{ matrix.package }}" --no-link --no-update-lock-file |
55 | 59 |
|
56 | 60 | test: |
57 | 61 | name: Test ${{ matrix.check }} (${{ matrix.target.system }}) |
@@ -88,12 +92,17 @@ jobs: |
88 | 92 |
|
89 | 93 | - name: Install Nix |
90 | 94 | uses: DeterminateSystems/nix-installer-action@main |
91 | | - |
92 | | - - name: Enable Magic Nix Cache |
93 | | - uses: DeterminateSystems/magic-nix-cache-action@main |
94 | | - |
95 | | - - name: Run test |
96 | | - run: nix build ".#checks.${{ matrix.target.system }}.${{ matrix.check }}" --no-link --no-update-lock-file |
| 95 | + with: |
| 96 | + extra-conf: | |
| 97 | + accept-flake-config = true |
| 98 | +
|
| 99 | + - name: Run and upload test |
| 100 | + env: |
| 101 | + CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} |
| 102 | + run: | |
| 103 | + : "${CACHIX_AUTH_TOKEN:?CACHIX_AUTH_TOKEN is required to upload to Cachix}" |
| 104 | + nix run --inputs-from . nixpkgs#cachix -- watch-exec openshell -- \ |
| 105 | + nix build ".#checks.${{ matrix.target.system }}.${{ matrix.check }}" --no-link --no-update-lock-file |
97 | 106 |
|
98 | 107 | lint: |
99 | 108 | name: Lint ${{ matrix.lint }} (${{ matrix.target.system }}) |
@@ -131,9 +140,14 @@ jobs: |
131 | 140 |
|
132 | 141 | - name: Install Nix |
133 | 142 | uses: DeterminateSystems/nix-installer-action@main |
134 | | - |
135 | | - - name: Enable Magic Nix Cache |
136 | | - uses: DeterminateSystems/magic-nix-cache-action@main |
137 | | - |
138 | | - - name: Run lint |
139 | | - run: nix build ".#checks.${{ matrix.target.system }}.${{ matrix.lint }}" --no-link --no-update-lock-file |
| 143 | + with: |
| 144 | + extra-conf: | |
| 145 | + accept-flake-config = true |
| 146 | +
|
| 147 | + - name: Run and upload lint |
| 148 | + env: |
| 149 | + CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} |
| 150 | + run: | |
| 151 | + : "${CACHIX_AUTH_TOKEN:?CACHIX_AUTH_TOKEN is required to upload to Cachix}" |
| 152 | + nix run --inputs-from . nixpkgs#cachix -- watch-exec openshell -- \ |
| 153 | + nix build ".#checks.${{ matrix.target.system }}.${{ matrix.lint }}" --no-link --no-update-lock-file |
0 commit comments