proper setup

This commit is contained in:
Ingolf Wagner 2024-07-20 01:23:21 +02:00
parent 4decf1a76b
commit 49fa344bb1
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B

View file

@ -4,19 +4,30 @@ jobs:
runs-on: native
steps:
- uses: actions/checkout@v4
- run: |
- name: prepare ssh
run: |
cat <<EOF > .id_rsa
${{ secrets.SSH_KEY }}
EOF
chmod 600 .id_rsa
eval $(ssh-agent)
ssh-add .id_rsa
NIX_SSHOPTS="-i $PWD/id_rsa" nix flake update
cat <<EOF > "$GITHUB_ENV"
SSH_AUTH_SOCK="$SSH_AUTH_SOCK"
SSH_AGENT_PID=$SSH_AGENT_PID
EOF
- run: nix flake update
- 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
- if: always()
- name: destroy ssh
if: always()
run: |
echo $SSH_AGENT_PID
kill $SSH_AGENT_PID