env fun
This commit is contained in:
parent
ff7e3923f8
commit
26101aaf70
1 changed files with 3 additions and 6 deletions
|
@ -21,8 +21,6 @@ jobs:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
env:
|
env:
|
||||||
PATH: ${{ format('{0}:{1}', '/run/current-system/sw/bin', env.PATH) }}
|
PATH: ${{ format('{0}:{1}', '/run/current-system/sw/bin', env.PATH) }}
|
||||||
outputs:
|
|
||||||
matrix: ${{ steps.build.outputs.drvout }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: https://github.com/actions/checkout@v4
|
uses: https://github.com/actions/checkout@v4
|
||||||
|
@ -34,7 +32,6 @@ jobs:
|
||||||
name: hsndev
|
name: hsndev
|
||||||
# If you chose API tokens for write access OR if you have a private cache
|
# If you chose API tokens for write access OR if you have a private cache
|
||||||
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
||||||
|
|
||||||
- name: Garbage collect build dependencies
|
- name: Garbage collect build dependencies
|
||||||
run: nix-collect-garbage
|
run: nix-collect-garbage
|
||||||
|
|
||||||
|
@ -43,18 +40,18 @@ jobs:
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
echo "drvout=nix build .#deploy-json.${{ matrix.system }} --print-out-paths" >> "${GITHUB_ENV}"
|
echo "DRVOUT=nix build .#deploy-json.${{ matrix.system }} --print-out-paths" >> $GITHUB_ENV
|
||||||
- name: Push cache for ${{ matrix.name }} to cachix
|
- name: Push cache for ${{ matrix.name }} to cachix
|
||||||
id: "push-to-cachix"
|
id: "push-to-cachix"
|
||||||
if: success()
|
if: success()
|
||||||
env:
|
env:
|
||||||
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}
|
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
echo ${{ env.drvout }} | cachix push hsndev
|
echo $DRVOUT | cachix push hsndev
|
||||||
- name: Deploy ${{ matrix.system }} runners
|
- name: Deploy ${{ matrix.system }} runners
|
||||||
id: "deploy"
|
id: "deploy"
|
||||||
if: success()
|
if: success()
|
||||||
env:
|
env:
|
||||||
CACHIX_ACTIVATE_TOKEN: ${{ secrets.CACHIX_ACTIVATE_TOKEN }}
|
CACHIX_ACTIVATE_TOKEN: ${{ secrets.CACHIX_ACTIVATE_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
cachix deploy activate ${{ env.drvout }}
|
cachix deploy activate $DRVOUT
|
Loading…
Reference in a new issue