Deploy on success
Some checks failed
Some checks failed
This commit is contained in:
parent
2f22ea63ce
commit
17b3fba5f6
1 changed files with 24 additions and 7 deletions
|
@ -49,11 +49,28 @@ jobs:
|
||||||
if: success()
|
if: success()
|
||||||
env:
|
env:
|
||||||
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}
|
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}
|
||||||
run: nix build ".#top.${{ matrix.system }}" --json | jq -r .[].drvPath | cachix push hsndev
|
run: |
|
||||||
- name: Push Deployment to runners
|
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()
|
if: success()
|
||||||
|
needs:
|
||||||
|
- nix-build-success
|
||||||
|
runs-on: docker
|
||||||
env:
|
env:
|
||||||
CACHIX_ACTIVATE_TOKEN: ${{ secrets.CACHIX_ACTIVATE_TOKEN }}
|
CACHIX_ACTIVATE_TOKEN: ${{ secrets.CACHIX_ACTIVATE_TOKEN }}
|
||||||
|
steps:
|
||||||
|
- name: Deploy Runners
|
||||||
run: |
|
run: |
|
||||||
spec=$(nix build --print-out-paths)
|
spec=$(nix build .#deploy-json --print-out-paths)
|
||||||
cachix deploy activate $spec
|
cachix deploy activate $spec
|
Loading…
Reference in a new issue