2023-11-16 22:00:49 +00:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [master]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
check:
|
|
|
|
name: Check Nix flake
|
|
|
|
runs-on: ubuntu-22.04
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: cachix/install-nix-action@v23
|
2023-11-16 23:50:17 +00:00
|
|
|
with:
|
|
|
|
# Gitea will supply a token in GITHUB_TOKEN, which this action will
|
|
|
|
# try to pass to Nix when downloading from GitHub
|
|
|
|
github_access_token: ${{ secrets.GH_PULL_TOKEN }}
|
|
|
|
extra_nix_config: |
|
|
|
|
# Make sure we're using sandbox
|
|
|
|
sandbox-fallback = false
|
|
|
|
- name: Fix Nix path
|
|
|
|
run: ln -s $(which nix) /usr/local/bin/nix
|
2023-11-16 22:00:49 +00:00
|
|
|
- uses: DeterminateSystems/magic-nix-cache-action@main
|
2023-11-16 23:50:17 +00:00
|
|
|
env:
|
|
|
|
# Arch is amd64 in Gitea actions, this forms the download path for the cache
|
|
|
|
RUNNER_ARCH: X64
|
2023-11-16 22:00:49 +00:00
|
|
|
|
|
|
|
- name: Write agenix secrets key to file
|
|
|
|
env:
|
|
|
|
KEY: ${{ secrets.AGENIX_SECRETS_KEY }}
|
|
|
|
run: printf "$KEY" > .keys/ci.key
|
|
|
|
- name: Check flake
|
|
|
|
run: nix flake check
|