infra/.forgejo/workflows/check.yml
teutat3s 87ea6353a2
Some checks failed
Flake checks / Check (pull_request) Failing after 51s
ci: run actions runner as normal user
2024-05-30 15:49:56 +02:00

30 lines
983 B
YAML

name: Flake checks
on: [pull_request]
jobs:
Check:
runs-on: self-hosted
steps:
- name: Check out repository code
uses: https://code.forgejo.org/actions/checkout@v4
- name: Check formatting
run: |
nix --accept-flake-config --access-tokens '' develop --command treefmt --fail-on-change
- name: Run flake checks
run: |
set -exuo pipefail
# Prevent cache garbage collection by creating GC roots
for target in $(nix flake show --json --all-systems | jq '
.["nixosConfigurations"] |
to_entries[] |
.key
' | tr -d '"'
); do
nix --print-build-logs --verbose --accept-flake-config --access-tokens '' \
build --out-link ./result-"$target" ".#nixosConfigurations.${target}.config.system.build.toplevel"
done
nix --print-build-logs --verbose --accept-flake-config --access-tokens '' flake check