Skip to content

Commit

Permalink
ci: try to fix cachix in self-hosted runner
Browse files Browse the repository at this point in the history
  • Loading branch information
lovesegfault committed Oct 12, 2023
1 parent 3b78332 commit 9cbbbec
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ on:
permissions: {}

env:
flake: "github:${{ github.repository }}/${{ github.sha }}"
flake: github:${{ github.repository }}/${{ github.sha }}
nix-conf: |-
accept-flake-config = true
builders-use-substitutes = true
max-jobs = auto
aarch64-host: "aarch64.nixos.community"
cachix-install: nix profile install 'github:${{ github.repository }}/${{ github.sha }}#cachix'
aarch64-host: aarch64.nixos.community
aarch64-ssh-config: |-
Host aarch64.nixos.community 147.28.143.250
User lovesegfault
Expand Down Expand Up @@ -188,18 +189,21 @@ jobs:
matrix:
attrs: ${{ fromJson(needs.get-attrs.outputs.build) }}
env:
self-hosted: ${{ !contains(matrix.attrs.runsOn, 'self-hosted') }}
aarch64-ssh-key: ${{ secrets.AARCH64_BUILDER_KEY }}
system: ${{ matrix.attrs.hostPlatform }}
steps:
- uses: DeterminateSystems/nix-installer-action@v5
if: ${{ !contains(matrix.attrs.runsOn, 'self-hosted') }}
if: ${{ env.self-hosted != 'true' }}
with:
extra-conf: ${{ env.nix-conf }}
- uses: cachix/cachix-action@v12
with:
name: nix-config
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
extraPullNames: nix-community
skipAddingSubstituter: ${{ env.self-hosted }}
installCommand: ${{ env.self-hosted == 'true' && 'true' || env.cachix-install }}
- name: setup-aarch64-ssh
if: ${{ env.system == 'aarch64-linux' && !contains(matrix.attrs.runsOn, 'self-hosted') }}
run: |
Expand Down

0 comments on commit 9cbbbec

Please sign in to comment.