nixos-config/.forgejo/workflows/nix_build.yaml

48 lines
1.1 KiB
YAML
Raw Normal View History

2024-07-20 22:32:37 +02:00
name: Build all NixOS Configurations
on:
- push
2024-07-19 19:00:35 +02:00
jobs:
2024-07-20 22:32:37 +02:00
nix build:
2024-07-19 19:00:35 +02:00
runs-on: native
steps:
2024-07-19 19:12:42 +02:00
- uses: actions/checkout@v4
2024-07-20 01:23:21 +02:00
2024-07-20 02:26:35 +02:00
- name: setup ssh
2024-07-20 01:23:21 +02:00
run: |
2024-07-20 00:58:36 +02:00
cat <<EOF > .id_rsa
2024-07-20 00:06:03 +02:00
${{ secrets.SSH_KEY }}
EOF
2024-07-20 00:58:36 +02:00
chmod 600 .id_rsa
2024-07-20 13:56:03 +02:00
2024-07-20 00:58:36 +02:00
eval $(ssh-agent)
2024-07-20 01:00:42 +02:00
ssh-add .id_rsa
2024-07-20 13:56:03 +02:00
2024-07-20 01:23:21 +02:00
cat <<EOF > "$GITHUB_ENV"
SSH_AUTH_SOCK="$SSH_AUTH_SOCK"
SSH_AGENT_PID=$SSH_AGENT_PID
EOF
2024-07-20 22:32:37 +02:00
- run: nix flake archive
2024-07-20 02:27:55 +02:00
- run: nix flake check
2024-07-20 01:23:21 +02:00
2024-07-20 02:26:35 +02:00
- name: teardown ssh
2024-07-20 01:23:21 +02:00
if: always()
2024-07-20 00:58:36 +02:00
run: |
echo $SSH_AGENT_PID
kill $SSH_AGENT_PID
2024-07-20 22:32:37 +02:00
- name: nix build orbi
run: nix build .#nixosConfigurations.orbi.config.system.build.toplevel
- name: nix build cream
run: nix build .#nixosConfigurations.cream.config.system.build.toplevel
- name: nix build cherry
run: nix build .#nixosConfigurations.cherry.config.system.build.toplevel
- name: nix build chungus
run: nix build .#nixosConfigurations.chungus.config.system.build.toplevel