From 2b7aa0177c1ab7655a1b232d365609fb21a37dec Mon Sep 17 00:00:00 2001 From: Gerg-L Date: Mon, 10 Jul 2023 05:46:15 -0400 Subject: [PATCH] ... --- .github/workflows/flake-update.yml | 2 +- .github/workflows/nix-github-actions.yml | 36 ++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/nix-github-actions.yml diff --git a/.github/workflows/flake-update.yml b/.github/workflows/flake-update.yml index d2331a5..6438648 100644 --- a/.github/workflows/flake-update.yml +++ b/.github/workflows/flake-update.yml @@ -4,7 +4,7 @@ "workflow_dispatch": null, "schedule": [ { - "cron": "0 0 * * *" + "cron": "0 10 * * *" } ] }, diff --git a/.github/workflows/nix-github-actions.yml b/.github/workflows/nix-github-actions.yml new file mode 100644 index 0000000..768f20c --- /dev/null +++ b/.github/workflows/nix-github-actions.yml @@ -0,0 +1,36 @@ +name: Nix Flake actions + +on: + pull_request: + push: + branches: + - master + - main + +jobs: + nix-matrix: + runs-on: ubuntu-latest + outputs: + matrix: ${{ steps.set-matrix.outputs.matrix }} + steps: + - uses: actions/checkout@v3 + - name: Install Nix + uses: DeterminateSystems/nix-installer-action@v4 + - id: set-matrix + name: Generate Nix Matrix + run: | + set -Eeu + echo "matrix=$(nix eval --json '.#githubActions.matrix')" >> "$GITHUB_OUTPUT" + + nix-build: + needs: nix-matrix + runs-on: ${{ matrix.os }} + strategy: + matrix: ${{fromJSON(needs.nix-matrix.outputs.matrix)}} + steps: + - uses: actions/checkout@v3 + - name: Install Nix + uses: DeterminateSystems/nix-installer-action@v4 + - name: Run Nix cache + uses: DeterminateSystems/magic-nix-cache-action@v1 + - run: nix build -L ".#${{ matrix.attr }}"