fix: caddy hash #963
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check | |
on: | |
- push | |
jobs: | |
check: | |
name: Check | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ssh-key: ${{secrets.SSH_KEY}} | |
submodules: 'true' | |
- uses: cachix/install-nix-action@v30 | |
- uses: DeterminateSystems/flake-checker-action@v9 | |
- name: Check formatting | |
run: nix fmt -- --ci | |
eval-check: | |
name: Eval | |
runs-on: ubuntu-24.04 | |
needs: check | |
strategy: | |
fail-fast: false | |
matrix: | |
nix-version: | |
- 2.24.11 # 24.11, unstable | |
- latest | |
- lix | |
env: | |
SSH_AUTH_SOCK: /tmp/ssh_agent.sock | |
FLAKE: 'git+ssh://git@github.com/${{ github.repository }}.git?ref=${{ github.ref }}&rev=${{ github.sha }}&submodules=1' | |
steps: | |
- uses: cachix/install-nix-action@v30 | |
if: matrix.nix-version != 'lix' | |
with: | |
install_url: ${{ matrix.nix-version != 'latest' && format('https://releases.nixos.org/nix/nix-{0}/install', matrix.nix-version) || '' }} | |
- name: Install Lix | |
if: matrix.nix-version == 'lix' | |
run: | | |
curl -sSf -L https://install.lix.systems/lix | sh -s -- install --no-confirm | |
sudo tee -a /etc/nix/nix.conf <<< "trusted-users = root worker" | |
sudo tee -a /etc/nix/nix.conf <<< "experimental-features = nix-command flakes" | |
- name: Add SSH key to agent | |
env: | |
SSH_KEY: ${{ secrets.SSH_KEY }} | |
run: | | |
ssh-agent -a $SSH_AUTH_SOCK > /dev/null | |
ssh-add - <<< "$SSH_KEY" | |
- name: Check flake outputs | |
run: nix flake check "$FLAKE" --no-build --all-systems --no-allow-import-from-derivation | |
build: | |
name: Build | |
runs-on: ubuntu-24.04 | |
needs: eval-check | |
strategy: | |
fail-fast: false | |
matrix: | |
system: [iso] | |
env: | |
SSH_AUTH_SOCK: /tmp/ssh_agent.sock | |
FLAKE: 'git+ssh://git@github.com/${{ github.repository }}.git?ref=${{ github.ref }}&rev=${{ github.sha }}&submodules=1' | |
OUTPUT: 'nixosConfigurations.${{ matrix.system }}.config.system.build.toplevel' | |
steps: | |
- uses: cachix/install-nix-action@v30 | |
- name: Add SSH key to agent | |
env: | |
SSH_KEY: ${{ secrets.SSH_KEY }} | |
run: | | |
ssh-agent -a $SSH_AUTH_SOCK > /dev/null | |
ssh-add - <<< "$SSH_KEY" | |
- name: Build | |
run: nix build "$FLAKE#$OUTPUT" |