Skip to content

Commit b8044c2

Browse files
authored
Replace magic-nix-cache-action (#2575)
1 parent df69840 commit b8044c2

File tree

6 files changed

+45
-18
lines changed

6 files changed

+45
-18
lines changed

.github/workflows/build.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,13 @@ jobs:
3131
- '**/*.go'
3232
- 'integration_test/'
3333
- 'config-example.yaml'
34-
- uses: DeterminateSystems/nix-installer-action@main
34+
- uses: nixbuild/nix-quick-install-action@master
3535
if: steps.changed-files.outputs.files == 'true'
36-
- uses: DeterminateSystems/magic-nix-cache-action@main
36+
- uses: nix-community/cache-nix-action@main
3737
if: steps.changed-files.outputs.files == 'true'
38+
with:
39+
primary-key: nix-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/*.nix', '**/flake.lock') }}
40+
restore-prefixes-first-match: nix-${{ runner.os }}-${{ runner.arch }}
3841

3942
- name: Run nix build
4043
id: build
@@ -84,8 +87,11 @@ jobs:
8487
- "GOARCH=amd64 GOOS=darwin"
8588
steps:
8689
- uses: actions/checkout@v4
87-
- uses: DeterminateSystems/nix-installer-action@main
88-
- uses: DeterminateSystems/magic-nix-cache-action@main
90+
- uses: nixbuild/nix-quick-install-action@master
91+
- uses: nix-community/cache-nix-action@main
92+
with:
93+
primary-key: nix-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/*.nix', '**/flake.lock') }}
94+
restore-prefixes-first-match: nix-${{ runner.os }}-${{ runner.arch }}
8995

9096
- name: Run go cross compile
9197
run: env ${{ matrix.env }} nix develop --command -- go build -o "headscale" ./cmd/headscale

.github/workflows/check-tests.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,13 @@ jobs:
2424
- '**/*.go'
2525
- 'integration_test/'
2626
- 'config-example.yaml'
27-
- uses: DeterminateSystems/nix-installer-action@main
27+
- uses: nixbuild/nix-quick-install-action@master
2828
if: steps.changed-files.outputs.files == 'true'
29-
- uses: DeterminateSystems/magic-nix-cache-action@main
29+
- uses: nix-community/cache-nix-action@main
3030
if: steps.changed-files.outputs.files == 'true'
31+
with:
32+
primary-key: nix-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/*.nix', '**/flake.lock') }}
33+
restore-prefixes-first-match: nix-${{ runner.os }}-${{ runner.arch }}
3134

3235
- name: Generate and check integration tests
3336
if: steps.changed-files.outputs.files == 'true'

.github/workflows/lint.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,13 @@ jobs:
2424
- '**/*.go'
2525
- 'integration_test/'
2626
- 'config-example.yaml'
27-
- uses: DeterminateSystems/nix-installer-action@main
27+
- uses: nixbuild/nix-quick-install-action@master
2828
if: steps.changed-files.outputs.files == 'true'
29-
- uses: DeterminateSystems/magic-nix-cache-action@main
29+
- uses: nix-community/cache-nix-action@main
3030
if: steps.changed-files.outputs.files == 'true'
31+
with:
32+
primary-key: nix-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/*.nix', '**/flake.lock') }}
33+
restore-prefixes-first-match: nix-${{ runner.os }}-${{ runner.arch }}
3134

3235
- name: golangci-lint
3336
if: steps.changed-files.outputs.files == 'true'
@@ -55,10 +58,13 @@ jobs:
5558
- '**/*.css'
5659
- '**/*.scss'
5760
- '**/*.html'
58-
- uses: DeterminateSystems/nix-installer-action@main
61+
- uses: nixbuild/nix-quick-install-action@master
5962
if: steps.changed-files.outputs.files == 'true'
60-
- uses: DeterminateSystems/magic-nix-cache-action@main
63+
- uses: nix-community/cache-nix-action@main
6164
if: steps.changed-files.outputs.files == 'true'
65+
with:
66+
primary-key: nix-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/*.nix', '**/flake.lock') }}
67+
restore-prefixes-first-match: nix-${{ runner.os }}-${{ runner.arch }}
6268

6369
- name: Prettify code
6470
if: steps.changed-files.outputs.files == 'true'
@@ -68,8 +74,11 @@ jobs:
6874
runs-on: ubuntu-latest
6975
steps:
7076
- uses: actions/checkout@v4
71-
- uses: DeterminateSystems/nix-installer-action@main
72-
- uses: DeterminateSystems/magic-nix-cache-action@main
77+
- uses: nixbuild/nix-quick-install-action@master
78+
- uses: nix-community/cache-nix-action@main
79+
with:
80+
primary-key: nix-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/*.nix', '**/flake.lock') }}
81+
restore-prefixes-first-match: nix-${{ runner.os }}-${{ runner.arch }}
7382

7483
- name: Buf lint
7584
run: nix develop --command -- buf lint proto

.github/workflows/release.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,11 @@ jobs:
3030
username: ${{ github.repository_owner }}
3131
password: ${{ secrets.GITHUB_TOKEN }}
3232

33-
- uses: DeterminateSystems/nix-installer-action@main
34-
- uses: DeterminateSystems/magic-nix-cache-action@main
33+
- uses: nixbuild/nix-quick-install-action@master
34+
- uses: nix-community/cache-nix-action@main
35+
with:
36+
primary-key: nix-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/*.nix', '**/flake.lock') }}
37+
restore-prefixes-first-match: nix-${{ runner.os }}-${{ runner.arch }}
3538

3639
- name: Run goreleaser
3740
run: nix develop --command -- goreleaser release --clean

.github/workflows/test-integration.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,13 @@ jobs:
116116
- name: Setup SSH server for Actor
117117
if: ${{ env.HAS_TAILSCALE_SECRET }}
118118
uses: alexellis/setup-sshd-actor@master
119-
- uses: DeterminateSystems/nix-installer-action@main
119+
- uses: nixbuild/nix-quick-install-action@master
120120
if: steps.changed-files.outputs.files == 'true'
121-
- uses: DeterminateSystems/magic-nix-cache-action@main
121+
- uses: nix-community/cache-nix-action@main
122122
if: steps.changed-files.outputs.files == 'true'
123+
with:
124+
primary-key: nix-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/*.nix', '**/flake.lock') }}
125+
restore-prefixes-first-match: nix-${{ runner.os }}-${{ runner.arch }}
123126
- uses: satackey/action-docker-layer-caching@main
124127
if: steps.changed-files.outputs.files == 'true'
125128
continue-on-error: true

.github/workflows/test.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,13 @@ jobs:
2727
- 'integration_test/'
2828
- 'config-example.yaml'
2929
30-
- uses: DeterminateSystems/nix-installer-action@main
30+
- uses: nixbuild/nix-quick-install-action@master
3131
if: steps.changed-files.outputs.files == 'true'
32-
- uses: DeterminateSystems/magic-nix-cache-action@main
32+
- uses: nix-community/cache-nix-action@main
3333
if: steps.changed-files.outputs.files == 'true'
34+
with:
35+
primary-key: nix-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/*.nix', '**/flake.lock') }}
36+
restore-prefixes-first-match: nix-${{ runner.os }}-${{ runner.arch }}
3437

3538
- name: Run tests
3639
if: steps.changed-files.outputs.files == 'true'

0 commit comments

Comments
 (0)