@@ -202,9 +202,8 @@ jobs:
202202 runs-on : self-hosted
203203 name : Final Results
204204 needs : [build, slurp-matrix]
205+ if : always()
205206 steps :
206- - uses : actions/checkout@v4
207-
208207 - name : Post Comment
209208 uses : metacraft-labs/nixos-modules/.github/print-matrix@main
210209 with :
@@ -216,6 +215,12 @@ jobs:
216215 precalc_matrix : ${{ needs.slurp-matrix.outputs.fullMatrix }}
217216 token : ${{ secrets.GITHUB_TOKEN }}
218217
218+ - run : exit 1
219+ if : >-
220+ needs.slurp-matrix.outputs.matrix != '{"include":[]}'
221+ && contains(needs.*.result, 'failure')
222+ || contains(needs.*.result, 'cancelled')
223+
219224 - uses : cachix/cachix-action@v15
220225 if : inputs.do_deploy
221226 with :
@@ -225,14 +230,7 @@ jobs:
225230 - name : Deploy
226231 if : inputs.do_deploy
227232 env :
233+ CACHIX_CACHE : ${{ vars.CACHIX_CACHE }}
234+ CACHIX_AUTH_TOKEN : ${{ secrets.CACHIX_AUTH_TOKEN }}
228235 CACHIX_ACTIVATE_TOKEN : ' ${{ secrets.CACHIX_ACTIVATE_TOKEN }}'
229236 run : nix run --accept-flake-config github:metacraft-labs/nixos-modules#mcl deploy_spec
230-
231- - run : exit 1
232- if : >-
233- ${{ fromJSON(needs.slurp-matrix.outputs.matrix).include.length > 0 &&
234- (contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')) }}
235- - run : exit 0
236- if : >-
237- ${{fromJSON(needs.slurp-matrix.outputs.matrix).include.length == 0 &&
238- (contains(needs.*.result, 'success') || contains(needs.*.result, 'skipped')) }}
0 commit comments