1+ name : Nix CI
2+
3+ on :
4+ pull_request :
5+ paths :
6+ - ' .github/workflows/nix.yml'
7+ - ' nix/**'
8+ - ' src/**'
9+ - ' Cargo.*'
10+ - ' flake.*'
11+ push :
12+ branches :
13+ - main
14+ paths :
15+ - ' .github/workflows/nix.yml'
16+ - ' nix/**'
17+ - ' src/**'
18+ - ' Cargo.*'
19+ - ' flake.*'
20+ workflow_dispatch :
21+
22+ permissions :
23+ contents : read
24+
25+ concurrency :
26+ group : ${{ github.sha }}
27+ cancel-in-progress : true
28+
29+ jobs :
30+ discover :
31+ outputs :
32+ hits : ${{ steps.discovery.outputs.hits }}
33+ nix_conf : ${{ steps.discovery.outputs.nix_conf }}
34+ runs-on : ubuntu-latest
35+ concurrency :
36+ group : ${{ github.workflow }}
37+ steps :
38+ - name : Standard Discovery
39+ uses : divnix/std-action/discover@main
40+ id : discovery
41+ publish-containers :
42+ needs : discover
43+ strategy :
44+ fail-fast : false
45+ matrix :
46+ target : ${{ fromJSON(needs.discover.outputs.hits).containers.publish }}
47+ name : ${{ matrix.target.cell }} - ${{ matrix.target.name }}
48+ runs-on : ubuntu-latest
49+ steps :
50+ - run : |
51+ config="$HOME/.docker/config.json"
52+ mkdir -p "${config%/*}"
53+ jq -n --arg token "${{ secrets.DOCKER_AUTH_TOKEN }}" '{ "auths": { "registry.ci.iog.io": { auth: $token } } }' > "$config"
54+ chmod 0600 "$config"
55+ - uses : divnix/std-action/run@main
56+ with :
57+ extra_nix_config : |
58+ ${{ needs.discover.outputs.nix_conf }}
59+ json : ${{ toJSON(matrix.target) }}
60+ nix_key : ${{ secrets.NIX_SIGNING_KEY }}
61+ s3_id : ${{ secrets.AWS_ACCESS_KEY_ID }}
62+ s3_key : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
63+ cache : s3://iog-catalyst-cache?region=eu-central-1
64+ build-packages :
65+ if : always()
66+ needs :
67+ - discover
68+ - publish-containers
69+ strategy :
70+ fail-fast : false
71+ matrix :
72+ target : ${{ fromJSON(needs.discover.outputs.hits).packages.build }}
73+ name : ${{ matrix.target.cell }} - ${{ matrix.target.name }}
74+ runs-on : ubuntu-latest
75+ steps :
76+ - uses : divnix/std-action/run@main
77+ with :
78+ extra_nix_config : |
79+ ${{ needs.discover.outputs.nix_conf }}
80+ json : ${{ toJSON(matrix.target) }}
81+ nix_key : ${{ secrets.NIX_SIGNING_KEY }}
82+ s3_id : ${{ secrets.AWS_ACCESS_KEY_ID }}
83+ s3_key : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
84+ cache : s3://iog-catalyst-cache?region=eu-central-1
85+ build-devshells :
86+ if : always()
87+ needs :
88+ - discover
89+ - publish-containers
90+ strategy :
91+ fail-fast : false
92+ matrix :
93+ target : ${{ fromJSON(needs.discover.outputs.hits).devshells.build }}
94+ name : ${{ matrix.target.cell }} - ${{ matrix.target.name }}
95+ runs-on : ubuntu-latest
96+ steps :
97+ - uses : divnix/std-action/run@main
98+ with :
99+ extra_nix_config : |
100+ ${{ needs.discover.outputs.nix_conf }}
101+ json : ${{ toJSON(matrix.target) }}
102+ nix_key : ${{ secrets.NIX_SIGNING_KEY }}
103+ s3_id : ${{ secrets.AWS_ACCESS_KEY_ID }}
104+ s3_key : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
105+ cache : s3://iog-catalyst-cache?region=eu-central-1
0 commit comments