mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-22 15:29:07 +01:00
workflows/check-deploy: Build checks individually for cachix caching
Some checks are pending
Some checks are pending
This commit is contained in:
parent
a56adf1ca9
commit
71132b3c94
1 changed files with 35 additions and 4 deletions
39
.github/workflows/check-deploy.yml
vendored
39
.github/workflows/check-deploy.yml
vendored
|
|
@ -1,9 +1,41 @@
|
||||||
name: "Check & Deploy"
|
name: "Check & Deploy"
|
||||||
on:
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
jobs:
|
jobs:
|
||||||
check:
|
generate-matrix:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
checks: ${{ steps.checks.outputs.checks }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v5
|
||||||
|
- uses: cachix/install-nix-action@v31
|
||||||
|
with:
|
||||||
|
extra_nix_config: experimental-features = nix-command flakes pipe-operators
|
||||||
|
- id: checks
|
||||||
|
run: |
|
||||||
|
checks=$(nix flake show --json | jq -c '.checks."x86_64-linux" | keys')
|
||||||
|
printf "checks=%s" "$checks" >> "$GITHUB_OUTPUT"
|
||||||
|
build-check:
|
||||||
|
needs: generate-matrix
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
check: ${{ fromJson(needs.generate-matrix.outputs.checks) }}
|
||||||
|
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 }}"
|
||||||
|
- run: nix build .#checks.x86_64-linux.${{ matrix.check }} --print-build-logs
|
||||||
|
flake-check:
|
||||||
|
needs: build-check
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v5
|
||||||
|
|
@ -14,10 +46,9 @@ jobs:
|
||||||
with:
|
with:
|
||||||
name: sebastian-stork
|
name: sebastian-stork
|
||||||
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
|
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
|
||||||
- run: nix flake check --print-build-logs
|
- run: nix flake check --keep-going --print-build-logs
|
||||||
- run: nix build .#checks.x86_64-linux.infrastructure-test --print-build-logs
|
|
||||||
deploy:
|
deploy:
|
||||||
needs: check
|
needs: flake-check
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue