Skip to content

Commit fbde98a

Browse files
authored
Merge branch 'main' into feature/add-SECURITY-md
2 parents 7525ffc + ac7bcde commit fbde98a

File tree

3 files changed

+111
-6
lines changed

3 files changed

+111
-6
lines changed

.github/workflows/nix.yml

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
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

flake.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@
3131
cellsFrom = ./nix;
3232

3333
cellBlocks = [
34-
(std.blockTypes.containers "containers")
35-
(std.blockTypes.devshells "devshells")
34+
(std.blockTypes.containers "containers" {ci.publish = true;})
35+
(std.blockTypes.devshells "devshells" {ci.build = true;})
3636
(std.blockTypes.functions "constants")
3737
(std.blockTypes.functions "lib")
3838
(std.blockTypes.functions "toolchains")
3939
(std.blockTypes.installables "artifacts")
4040
(std.blockTypes.installables "libraries")
41-
(std.blockTypes.installables "packages")
41+
(std.blockTypes.installables "packages" {ci.build = true;})
4242
(std.blockTypes.nixago "configs")
4343
(std.blockTypes.runnables "operables")
4444
];

0 commit comments

Comments
 (0)