Skip to content

Commit 797d689

Browse files
ci: update to determinate systems
1 parent b182981 commit 797d689

File tree

6 files changed

+37
-71
lines changed

6 files changed

+37
-71
lines changed

template/elm/.github/workflows/main.yaml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,18 @@ on:
55
push:
66
branches: [main]
77
env:
8-
CI_NIX_STORE: ~/nix
98
CI_NIX_FLAKE: .#default
109
jobs:
1110
lint:
1211
runs-on: ubuntu-latest
1312
steps:
14-
- name: Setup Nix
15-
uses: cachix/install-nix-action@v26
1613
- name: Checkout
1714
uses: actions/checkout@v4
15+
- name: Setup Nix
16+
uses: DeterminateSystems/nix-installer-action@main
1817
- name: Cache Nix
19-
uses: actions/cache@v4
20-
with:
21-
path: ${{ env.CI_NIX_STORE }}
22-
key: ${{ runner.os }}-nix-${{ hashFiles('flake.nix', 'flake.lock') }}
18+
uses: DeterminateSystems/magic-nix-cache-action@main
2319
- name: Lint
2420
run: |
25-
nix --store ${{ env.CI_NIX_STORE }} \
26-
develop ${{ env.CI_NIX_FLAKE }} --command \
21+
nix develop ${{ env.CI_NIX_FLAKE }} --command \
2722
editorconfig-checker && echo "ok"

template/gleam-fullstack/.github/workflows/main.yaml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,18 @@ on:
55
push:
66
branches: [main]
77
env:
8-
CI_NIX_STORE: ~/nix
98
CI_NIX_FLAKE: .#default
109
jobs:
1110
lint:
1211
runs-on: ubuntu-latest
1312
steps:
14-
- name: Setup Nix
15-
uses: cachix/install-nix-action@v26
1613
- name: Checkout
1714
uses: actions/checkout@v4
15+
- name: Setup Nix
16+
uses: DeterminateSystems/nix-installer-action@main
1817
- name: Cache Nix
19-
uses: actions/cache@v4
20-
with:
21-
path: ${{ env.CI_NIX_STORE }}
22-
key: ${{ runner.os }}-nix-${{ hashFiles('flake.nix', 'flake.lock') }}
18+
uses: DeterminateSystems/magic-nix-cache-action@main
2319
- name: Lint
2420
run: |
25-
nix --store ${{ env.CI_NIX_STORE }} \
26-
develop ${{ env.CI_NIX_FLAKE }} --command \
21+
nix develop ${{ env.CI_NIX_FLAKE }} --command \
2722
editorconfig-checker && echo "ok"

template/gleam/.github/workflows/main.yaml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,18 @@ on:
55
push:
66
branches: [main]
77
env:
8-
CI_NIX_STORE: ~/nix
98
CI_NIX_FLAKE: .#default
109
jobs:
1110
lint:
1211
runs-on: ubuntu-latest
1312
steps:
14-
- name: Setup Nix
15-
uses: cachix/install-nix-action@v26
1613
- name: Checkout
1714
uses: actions/checkout@v4
15+
- name: Setup Nix
16+
uses: DeterminateSystems/nix-installer-action@main
1817
- name: Cache Nix
19-
uses: actions/cache@v4
20-
with:
21-
path: ${{ env.CI_NIX_STORE }}
22-
key: ${{ runner.os }}-nix-${{ hashFiles('flake.nix', 'flake.lock') }}
18+
uses: DeterminateSystems/magic-nix-cache-action@main
2319
- name: Lint
2420
run: |
25-
nix --store ${{ env.CI_NIX_STORE }} \
26-
develop ${{ env.CI_NIX_FLAKE }} --command \
21+
nix develop ${{ env.CI_NIX_FLAKE }} --command \
2722
editorconfig-checker && echo "ok"

template/go/.github/workflows/main.yaml

Lines changed: 17 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,30 @@ on:
55
push:
66
branches: [main]
77
env:
8-
CI_NIX_STORE: ~/nix
98
CI_NIX_FLAKE: .#default
109
jobs:
11-
test:
10+
lint:
1211
runs-on: ubuntu-latest
1312
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
1415
- name: Setup Nix
15-
uses: cachix/install-nix-action@v26
16+
uses: DeterminateSystems/nix-installer-action@main
17+
- name: Cache Nix
18+
uses: DeterminateSystems/magic-nix-cache-action@main
19+
- name: Lint
20+
run: |
21+
nix develop ${{ env.CI_NIX_FLAKE }} --command \
22+
editorconfig-checker && echo "ok"
23+
test:
24+
runs-on: ubuntu-latest
25+
steps:
1626
- name: Checkout
1727
uses: actions/checkout@v4
28+
- name: Setup Nix
29+
uses: DeterminateSystems/nix-installer-action@main
1830
- name: Cache Nix
19-
uses: actions/cache@v4
20-
with:
21-
path: ${{ env.CI_NIX_STORE }}
22-
key: ${{ runner.os }}-nix-${{ hashFiles('flake.nix', 'flake.lock') }}
31+
uses: DeterminateSystems/magic-nix-cache-action@main
2332
- name: Cache Go
2433
uses: actions/cache@v4
2534
with:
@@ -29,23 +38,5 @@ jobs:
2938
~/go/pkg/mod
3039
- name: Test
3140
run: |
32-
nix --store ${{ env.CI_NIX_STORE }} \
33-
develop ${{ env.CI_NIX_FLAKE }} --command \
41+
nix develop ${{ env.CI_NIX_FLAKE }} --command \
3442
go test -v -cover -race ./...
35-
lint:
36-
runs-on: ubuntu-latest
37-
steps:
38-
- name: Setup Nix
39-
uses: cachix/install-nix-action@v26
40-
- name: Checkout
41-
uses: actions/checkout@v4
42-
- name: Cache Nix
43-
uses: actions/cache@v4
44-
with:
45-
path: ${{ env.CI_NIX_STORE }}
46-
key: ${{ runner.os }}-nix-${{ hashFiles('flake.nix', 'flake.lock') }}
47-
- name: Lint
48-
run: |
49-
nix --store ${{ env.CI_NIX_STORE }} \
50-
develop ${{ env.CI_NIX_FLAKE }} --command \
51-
editorconfig-checker && echo "ok"

template/java/.github/workflows/main.yaml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,18 @@ on:
55
push:
66
branches: [main]
77
env:
8-
CI_NIX_STORE: ~/nix
98
CI_NIX_FLAKE: .#default
109
jobs:
1110
lint:
1211
runs-on: ubuntu-latest
1312
steps:
14-
- name: Setup Nix
15-
uses: cachix/install-nix-action@v26
1613
- name: Checkout
1714
uses: actions/checkout@v4
15+
- name: Setup Nix
16+
uses: DeterminateSystems/nix-installer-action@main
1817
- name: Cache Nix
19-
uses: actions/cache@v4
20-
with:
21-
path: ${{ env.CI_NIX_STORE }}
22-
key: ${{ runner.os }}-nix-${{ hashFiles('flake.nix', 'flake.lock') }}
18+
uses: DeterminateSystems/magic-nix-cache-action@main
2319
- name: Lint
2420
run: |
25-
nix --store ${{ env.CI_NIX_STORE }} \
26-
develop ${{ env.CI_NIX_FLAKE }} --command \
21+
nix develop ${{ env.CI_NIX_FLAKE }} --command \
2722
editorconfig-checker && echo "ok"

template/zig/.github/workflows/main.yaml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,18 @@ on:
55
push:
66
branches: [main]
77
env:
8-
CI_NIX_STORE: ~/nix
98
CI_NIX_FLAKE: .#default
109
jobs:
1110
lint:
1211
runs-on: ubuntu-latest
1312
steps:
14-
- name: Setup Nix
15-
uses: cachix/install-nix-action@v26
1613
- name: Checkout
1714
uses: actions/checkout@v4
15+
- name: Setup Nix
16+
uses: DeterminateSystems/nix-installer-action@main
1817
- name: Cache Nix
19-
uses: actions/cache@v4
20-
with:
21-
path: ${{ env.CI_NIX_STORE }}
22-
key: ${{ runner.os }}-nix-${{ hashFiles('flake.nix', 'flake.lock') }}
18+
uses: DeterminateSystems/magic-nix-cache-action@main
2319
- name: Lint
2420
run: |
25-
nix --store ${{ env.CI_NIX_STORE }} \
26-
develop ${{ env.CI_NIX_FLAKE }} --command \
21+
nix develop ${{ env.CI_NIX_FLAKE }} --command \
2722
editorconfig-checker && echo "ok"

0 commit comments

Comments
 (0)