Skip to content

Commit

Permalink
Use a environment variable to check each system
Browse files Browse the repository at this point in the history
Co-authored-by: Florian Sesser <[email protected]>
Signed-off-by: Benoit Donneaux <[email protected]>
  • Loading branch information
btlogy and hacklschorsch committed Feb 13, 2025
1 parent 71f9ae3 commit 7fcc8e1
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,17 @@ on:
- 'nix/**'
- 'flake.*'

env:
# This define the targeted systems we want to check (and later deploy) the nixosConfiguration
MATRIX: |
matrix={"include":[
{"target":"webforge","hostname":"webforge","domain":"tahoe-lafs.org"}
]}
jobs:
check:
name: Check
runs-on: ubuntu-24.04
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Checkout
id: checkout
Expand All @@ -35,19 +40,14 @@ jobs:
nix flake show
nix flake check
- name: Set matrix
id: set-matrix
run: |
echo 'matrix={"include":[{"target":"webforge","hostname":"webforge","domain":""}]}' >> $GITHUB_OUTPUT
build:
name: Build
runs-on: ubuntu-24.04
if: github.event_name == 'pull_request'
needs: check
strategy:
fail-fast: false
matrix: ${{fromJson(needs.check.outputs.matrix)}}
matrix: ${{ env.MATRIX }}
steps:
- name: Checkout
id: checkout
Expand Down

0 comments on commit 7fcc8e1

Please sign in to comment.