Skip to content

Commit 4cb2adb

Browse files
jfrocheyvan-sraka
authored andcommitted
fix: configure runner according to the matrix job
The matrix job returns the type of runner, so we can configure the nix installation step accordingly.
1 parent 46b5ced commit 4cb2adb

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.github/workflows/nix-build.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,14 @@ jobs:
3535
steps:
3636
- name: Checkout Repo
3737
uses: actions/checkout@v4
38-
- name: Build Nix Package
38+
- name: Install nix (ephemeral)
39+
if: ${{ matrix.runs_on.group != 'self-hosted-runners-nix' }}
40+
uses: ./.github/actions/nix-install-ephemeral
41+
env:
42+
DEV_AWS_ROLE: ${{ secrets.DEV_AWS_ROLE }}
43+
NIX_SIGN_SECRET_KEY: ${{ secrets.NIX_SIGN_SECRET_KEY }}
44+
- name: Install nix (self-hosted)
45+
if: ${{ matrix.runs_on.group == 'self-hosted-runners-nix' }}
3946
uses: ./.github/actions/nix-install-self-hosted
4047
- name: nix build
4148
shell: bash
@@ -55,7 +62,7 @@ jobs:
5562
steps:
5663
- name: Checkout Repo
5764
uses: actions/checkout@v4
58-
- name: Build Nix Package
65+
- name: Install nix
5966
uses: ./.github/actions/nix-install-self-hosted
6067
- name: nix build
6168
shell: bash

.github/workflows/nix-eval.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ jobs:
2929
name: Generate Nix Matrix
3030
run: |
3131
set -Eeu
32-
echo matrix="$(nix run .\#github-matrix checks legacyPackages)" >> "$GITHUB_OUTPUT"
32+
echo matrix="$(nix run --accept-flake-config .\#github-matrix checks legacyPackages)" >> "$GITHUB_OUTPUT"

0 commit comments

Comments
 (0)