mirror of
https://github.com/the-programmers-hangout/swiftspiracy-bot.git
synced 2026-09-06 16:06:23 +02:00
45 lines
1.6 KiB
YAML
45 lines
1.6 KiB
YAML
name: nix flake check
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
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 packages..."
|
|
run: |
|
|
nix profile install nixpkgs#nix-fast-build # parallel nix builder
|
|
|
|
- name: "Running `nix flake check`..."
|
|
run: nix-fast-build --skip-cached --no-nom
|
|
# NOTE: You can also limit the build only to the currentSystem
|
|
# run: nix-fast-build --skip-cached --no-nom --flake ".#checks.$(nix eval --raw --impure --expr builtins.currentSystem)"
|
|
|
|
- name: "Running `nix build ...`..."
|
|
run: nix-fast-build --skip-cached --no-nom --flake ".#packages"
|
|
# run: nix-fast-build --skip-cached --no-nom --flake ".#packages.$(nix eval --raw --impure --expr builtins.currentSystem)"
|
|
|
|
- name: "Running `nix develop...`..."
|
|
run: nix-fast-build --skip-cached --no-nom --flake ".#devShells"
|
|
# run: nix-fast-build --skip-cached --no-nom --flake ".#devShells.$(nix eval --raw --impure --expr builtins.currentSystem)"
|
|
|
|
- name: "Checking flake inputs for stale & insecure nixpkgs versions..."
|
|
uses: DeterminateSystems/flake-checker-action@main
|