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

34 lines
906 B
YAML
Raw Normal View History

2024-07-19 19:00:35 +02:00
on: [push]
jobs:
build:
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 13:56:03 +02:00
# - run: nix flake update
2024-07-19 21:55:40 +02:00
- run: nix build .#nixosConfigurations.orbi.config.system.build.toplevel
- run: nix build .#nixosConfigurations.cream.config.system.build.toplevel
- run: nix build .#nixosConfigurations.cherry.config.system.build.toplevel
- run: nix build .#nixosConfigurations.chungus.config.system.build.toplevel
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