Skip to content

Commit 3bc6f7b

Browse files
committed
fix(ci):
- pin nixpkgs in more jobs - refactor steps with nix commands
1 parent ff66813 commit 3bc6f7b

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

.github/workflows/ci.yaml

+12-6
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ name: Nix CI
1717
env:
1818
# https://stackoverflow.com/a/71158878
1919
git_pull: git pull --rebase origin ${{ github.head_ref || github.ref_name }}
20+
pin_nixpkgs: nix registry pin nixpkgs github:NixOS/nixpkgs/807c549feabce7eddbf259dbdcec9e0600a0660d
2021

2122
jobs:
2223
# Build the action
@@ -117,6 +118,9 @@ jobs:
117118
# except the version with the `primary-key`, if it exists
118119
purge-primary-key: never
119120

121+
- name: Pin nixpkgs
122+
run: ${{ env.pin_nixpkgs }}
123+
120124
- name: Install nixpkgs#bun
121125
if: ${{ matrix.id == 1 }}
122126
run: nix profile install nixpkgs#bun
@@ -225,12 +229,14 @@ jobs:
225229
- name: Show profile
226230
run: nix profile list
227231

228-
- name: Lock and install nixpkgs
229-
run: |
230-
nix registry add nixpkgs github:NixOS/nixpkgs/5daaa32204e9c46b05cd709218b7ba733d07e80c
231-
nix registry list
232-
233-
nix profile install $(nix flake archive nixpkgs --json | jq -r '.path')
232+
- name: Pin nixpkgs
233+
run: ${{ env.pin_nixpkgs }}
234+
235+
- name: List registry
236+
run: nix registry list
237+
238+
- name: Install nixpkgs
239+
run: nix profile install $(nix flake archive nixpkgs --json | jq -r '.path')
234240

235241
- name: Show profile
236242
run: nix profile list

0 commit comments

Comments
 (0)