Deploy on success
Some checks failed
Build / nix-build (native-x86_64, fj-shadowfax-01) (push) Failing after 1m17s
Build / nix-build (native-aarch64, fj-hetzner-aarch64-01) (push) Failing after 2m0s
Build / Nix Build Successful (push) Successful in 3s
Build / deploy (push) Failing after 3s

This commit is contained in:
Joseph Hanson 2024-07-25 10:09:09 -05:00
parent 2f22ea63ce
commit 17b3fba5f6
Signed by: jahanson
SSH key fingerprint: SHA256:vy6dKBECV522aPAwklFM3ReKAVB086rT3oWwiuiFG7o

View file

@ -49,11 +49,28 @@ jobs:
if: success()
env:
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}
run: nix build ".#top.${{ matrix.system }}" --json | jq -r .[].drvPath | cachix push hsndev
- name: Push Deployment to runners
if: success()
env:
CACHIX_ACTIVATE_TOKEN: ${{ secrets.CACHIX_ACTIVATE_TOKEN }}
run: |
spec=$(nix build --print-out-paths)
cachix deploy activate $spec
nix build .#deploy-json --print-out-paths | cachix push hsndev
nix-build-success:
if: ${{ always() }}
needs:
- nix-build
name: Nix Build Successful
runs-on: docker
steps:
- if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
name: Check matrix status
run: exit 1
deploy:
if: success()
needs:
- nix-build-success
runs-on: docker
env:
CACHIX_ACTIVATE_TOKEN: ${{ secrets.CACHIX_ACTIVATE_TOKEN }}
steps:
- name: Deploy Runners
run: |
spec=$(nix build .#deploy-json --print-out-paths)
cachix deploy activate $spec