diff options
author | Can | 2024-12-11 21:46:50 +0100 |
---|---|---|
committer | GitHub | 2024-12-11 21:46:50 +0100 |
commit | 0740a71446abe5227ee44b56301806de3c31046d (patch) | |
tree | 0d46a4a8d27731f0b6fb6c5921ea01156bbe17b2 /.github |
Initial commit
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/flake-check.yml | 41 | ||||
-rw-r--r-- | .github/workflows/update-flake-lock.yml | 16 |
2 files changed, 57 insertions, 0 deletions
diff --git a/.github/workflows/flake-check.yml b/.github/workflows/flake-check.yml new file mode 100644 index 0000000..43a6da2 --- /dev/null +++ b/.github/workflows/flake-check.yml @@ -0,0 +1,41 @@ +# Taken with permission from https://github.com/tsandrini/flake-parts-builder/blob/9eda2d9a7bc6949568147acaecb60ef9a7ab4552/flake-parts/gh-actions-check/.github/workflows/flake-check.yml +name: Check Nix flake + +on: + workflow_dispatch: # allows manual triggering from the Actions UI + push: + branches: + - main + pull_request: + types: [opened, reopened, synchronize] + repository_dispatch: + types: [create-pull-request] + +jobs: + flake-check: + runs-on: "ubuntu-latest" + steps: + - name: "Checking out repository..." + uses: actions/checkout@v4 + + - name: "Installing and configuring the nix package manager..." + uses: DeterminateSystems/nix-installer-action@main + with: + extra-conf: | + accept-flake-config = true + + - name: "Setting up magic-nix-cache..." + uses: DeterminateSystems/magic-nix-cache-action@main + + - name: "Setting up packages..." + run: | + nix profile install nixpkgs#nix-fast-build # parallel nix builder + + - name: "Running `nix build ...`..." + run: nix-fast-build --skip-cached --no-nom --flake ".#packages" + + - name: "Running `nix develop...`..." + run: nix-fast-build --skip-cached --no-nom --flake ".#devShells" + + - name: "Checking flake inputs for stale & insecure nixpkgs versions..." + uses: DeterminateSystems/flake-checker-action@main diff --git a/.github/workflows/update-flake-lock.yml b/.github/workflows/update-flake-lock.yml new file mode 100644 index 0000000..fa5cf61 --- /dev/null +++ b/.github/workflows/update-flake-lock.yml @@ -0,0 +1,16 @@ +name: update-flake-lock +on: + workflow_dispatch: # allows manual triggering + schedule: + - cron: '0 0 * * 2' # runs weekly on Tuesday at 00:00 UTC + +jobs: + lockfile: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Install Nix + uses: DeterminateSystems/nix-installer-action@main + - name: Update flake.lock + uses: DeterminateSystems/update-flake-lock@main |