2023-04-07 17:47:51 +00:00
|
|
|
name: "Validate flake & check formatting"
|
2023-02-01 19:11:37 +00:00
|
|
|
on:
|
|
|
|
pull_request:
|
2023-02-06 19:02:44 +00:00
|
|
|
workflow_dispatch:
|
2023-02-01 19:11:37 +00:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
2023-02-16 19:13:16 +00:00
|
|
|
paths-ignore:
|
|
|
|
- .github/**
|
|
|
|
- assets/**
|
|
|
|
- .gitignore
|
2023-02-01 19:11:37 +00:00
|
|
|
jobs:
|
|
|
|
nix-flake-check:
|
2023-04-07 17:47:51 +00:00
|
|
|
name: Validate Flake
|
2023-02-01 19:11:37 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
2023-04-07 23:32:47 +00:00
|
|
|
- uses: cachix/install-nix-action@v20
|
2023-02-01 19:11:37 +00:00
|
|
|
with:
|
|
|
|
extra_nix_config: |
|
|
|
|
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- run: nix flake check
|
2023-07-24 05:19:27 +00:00
|
|
|
|
2023-04-07 17:47:51 +00:00
|
|
|
format-with-alejandra:
|
2023-04-07 23:32:47 +00:00
|
|
|
name: Formatting via Alejandra
|
2023-04-07 17:47:51 +00:00
|
|
|
runs-on: ubuntu-latest
|
2023-07-24 05:19:27 +00:00
|
|
|
steps:
|
2023-04-07 17:47:51 +00:00
|
|
|
- uses: actions/checkout@v3
|
2023-04-07 23:32:47 +00:00
|
|
|
- uses: cachix/install-nix-action@v20
|
2023-04-07 17:47:51 +00:00
|
|
|
with:
|
|
|
|
install_url: https://nixos.org/nix/install
|
|
|
|
extra_nix_config: |
|
|
|
|
auto-optimise-store = true
|
|
|
|
experimental-features = nix-command flakes
|
|
|
|
- run: nix run nixpkgs#alejandra -- -c .
|