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
|
|
||||||
- name: Push Deployment to runners
|
|
||||||
if: success()
|
|
||||||
env:
|
|
||||||
CACHIX_ACTIVATE_TOKEN: ${{ secrets.CACHIX_ACTIVATE_TOKEN }}
|
|
||||||
run: |
|
run: |
|
||||||
spec=$(nix build --print-out-paths)
|
nix build .#deploy-json --print-out-paths | cachix push hsndev
|
||||||
cachix deploy activate $spec
|
|
||||||
|
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
|
||||||
|
|
Loading…
Reference in a new issue