Skip to content

Commit 56f72e0

Browse files
committed
fix(template): Run commands in a nix-shell to automatically pull the necessary dependencies
1 parent 02e66ca commit 56f72e0

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

template/.github/workflows/pr_pre-commit.yaml.j2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ jobs:
4040
chmod 700 "${LOCATION_BIN}"
4141

4242
echo "$LOCATION_DIR" >> "$GITHUB_PATH"
43+
- uses: cachix/install-nix-action@8887e596b4ee1134dae06b98d573bd674693f47c # v26
4344
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
4445
with:
4546
extra_args: "--from-ref ${{ github.event.pull_request.base.sha }} --to-ref ${{ github.event.pull_request.head.sha }}"

template/.pre-commit-config.yaml.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,13 @@ repos:
6666
- id: regenerate-charts
6767
name: regenerate-charts
6868
language: system
69-
entry: make regenerate-charts
69+
entry: nix-shell --run 'make regenerate-charts'
7070
stages: [commit, merge-commit, manual]
7171
pass_filenames: false
7272

7373
- id: cargo-test
7474
name: cargo-test
7575
language: system
76-
entry: cargo test
76+
entry: nix-shell --run 'cargo test'
7777
stages: [commit, merge-commit, manual]
7878
pass_filenames: false

0 commit comments

Comments
 (0)