mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-22 22:29:06 +01:00
Compare commits
3 commits
0b9e9aec38
...
0b87addc97
| Author | SHA1 | Date | |
|---|---|---|---|
| 0b87addc97 | |||
| 90d01ecd17 | |||
| d37a9c23a1 |
2 changed files with 29 additions and 1 deletions
25
.github/workflows/check-deploy.yml
vendored
25
.github/workflows/check-deploy.yml
vendored
|
|
@ -8,6 +8,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
checks: ${{ steps.checks.outputs.checks }}
|
checks: ${{ steps.checks.outputs.checks }}
|
||||||
|
hosts: ${{ steps.hosts.outputs.hosts }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v5
|
||||||
- uses: cachix/install-nix-action@v31
|
- uses: cachix/install-nix-action@v31
|
||||||
|
|
@ -17,6 +18,10 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
checks=$(nix flake show --json | jq -c '.checks."x86_64-linux" | keys')
|
checks=$(nix flake show --json | jq -c '.checks."x86_64-linux" | keys')
|
||||||
printf "checks=%s" "$checks" >> "$GITHUB_OUTPUT"
|
printf "checks=%s" "$checks" >> "$GITHUB_OUTPUT"
|
||||||
|
- id: hosts
|
||||||
|
run: |
|
||||||
|
hosts=$(nix flake show --json | jq -c '.nixosConfigurations | keys')
|
||||||
|
printf "hosts=%s" "$hosts" >> "$GITHUB_OUTPUT"
|
||||||
build-check:
|
build-check:
|
||||||
needs: generate-matrix
|
needs: generate-matrix
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
@ -35,6 +40,24 @@ jobs:
|
||||||
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
|
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
|
||||||
useDaemon: false
|
useDaemon: false
|
||||||
- run: nix build .#checks.x86_64-linux.${{ matrix.check }} --print-build-logs
|
- run: nix build .#checks.x86_64-linux.${{ matrix.check }} --print-build-logs
|
||||||
|
build-host:
|
||||||
|
needs: generate-matrix
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
host: ${{ fromJson(needs.generate-matrix.outputs.hosts) }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v5
|
||||||
|
- uses: cachix/install-nix-action@v31
|
||||||
|
with:
|
||||||
|
extra_nix_config: experimental-features = nix-command flakes pipe-operators
|
||||||
|
- uses: cachix/cachix-action@v15
|
||||||
|
with:
|
||||||
|
name: sebastian-stork
|
||||||
|
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
|
||||||
|
useDaemon: false
|
||||||
|
- run: nix build .#nixosConfigurations.${{ matrix.host }}.config.system.build.toplevel --print-build-logs
|
||||||
flake-check:
|
flake-check:
|
||||||
needs: build-check
|
needs: build-check
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
@ -49,7 +72,7 @@ jobs:
|
||||||
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
|
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
|
||||||
- run: nix flake check --keep-going --print-build-logs
|
- run: nix flake check --keep-going --print-build-logs
|
||||||
deploy:
|
deploy:
|
||||||
needs: flake-check
|
needs: [build-host, flake-check]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,11 @@
|
||||||
|
|
||||||
min-free = 4 * 1024 * 1024 * 1024;
|
min-free = 4 * 1024 * 1024 * 1024;
|
||||||
max-free = 6 * 1024 * 1024 * 1024;
|
max-free = 6 * 1024 * 1024 * 1024;
|
||||||
|
|
||||||
|
substituters = [ "https://sebastian-stork.cachix.org" ];
|
||||||
|
trusted-public-keys = [
|
||||||
|
"sebastian-stork.cachix.org-1:PAgwmtq5BF/UlUoXdBC2sX2EKZQ2vCjo3iGySujbaME="
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue