summaryrefslogtreecommitdiff
path: root/.github/workflows/example.yaml
diff options
context:
space:
mode:
authorseth <[email protected]>2023-12-22 00:14:28 +0000
committerGitHub <[email protected]>2023-12-22 00:14:28 +0000
commit8695d9d41441da0326d0260bae2f4962f32bfea0 (patch)
treee9ff3d979c6bcfa96a944e7797a1053b8b505235 /.github/workflows/example.yaml
parent648620fcae21a93a86275fc87a28732f91737725 (diff)
actions: try to fix subflake eval (#5)
Diffstat (limited to '.github/workflows/example.yaml')
-rw-r--r--.github/workflows/example.yaml35
1 files changed, 18 insertions, 17 deletions
diff --git a/.github/workflows/example.yaml b/.github/workflows/example.yaml
index 5c376c1..0c214e9 100644
--- a/.github/workflows/example.yaml
+++ b/.github/workflows/example.yaml
@@ -5,6 +5,7 @@ on:
jobs:
eval:
+ name: Evaluate flake
runs-on: ubuntu-latest
outputs:
@@ -13,13 +14,14 @@ jobs:
steps:
- uses: actions/checkout@v4
- - name: install nix
- uses: nixbuild/nix-quick-install-action@v26
+ - name: Install Nix
+ uses: DeterminateSystems/nix-installer-action@v9
- - name: generate matrix
+ - name: Generate matrix
id: generate
run: |
- set -Eeu
+ set -eu
+
echo "matrix=$(nix eval --show-trace --json .#githubWorkflow.matrix)" >> "$GITHUB_OUTPUT"
build:
@@ -28,28 +30,27 @@ jobs:
strategy:
matrix: ${{ fromJSON(needs.eval.outputs.matrix) }}
+ name: Build (${{matrix.attr}})
runs-on: ${{ matrix.os }}
- name: build (${{matrix.attr}})
-
steps:
- uses: actions/checkout@v4
- - name: setup qemu
+ - name: Setup Qemu
if: matrix.arch == 'aarch64'
- run: |
- sudo apt update -y
- sudo apt install -y qemu-user-static
+ uses: docker/setup-qemu-action@v3
+ with:
+ platforms: "arm64"
- - name: install nix
+ - name: Install Nix
if: matrix.arch != 'aarch64'
- uses: nixbuild/nix-quick-install-action@v26
+ uses: DeterminateSystems/nix-installer-action@v9
- - name: install nix (with aarch64)
+ - name: Install Nix (with aarch64)
if: matrix.arch == 'aarch64'
- uses: nixbuild/nix-quick-install-action@v26
+ uses: DeterminateSystems/nix-installer-action@v9
with:
- nix_conf: "extra-platforms = aarch64-linux arm-linux"
+ extra-conf: "extra-platforms = aarch64-linux arm-linux"
- - name: build ${{ matrix.attr }}
- run: nix build -L --fallback .#${{ matrix.attr }}
+ - name: Build ${{ matrix.attr }}
+ run: nix build -L .#${{ matrix.attr }}