Skip to content

Commit

Permalink
fix(template): Run commands in a nix-shell to automatically pull the …
Browse files Browse the repository at this point in the history
…necessary dependencies
  • Loading branch information
NickLarsenNZ committed Sep 16, 2024
1 parent 02e66ca commit 56f72e0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions template/.github/workflows/pr_pre-commit.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ jobs:
chmod 700 "${LOCATION_BIN}"

echo "$LOCATION_DIR" >> "$GITHUB_PATH"
- uses: cachix/install-nix-action@8887e596b4ee1134dae06b98d573bd674693f47c # v26
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
with:
extra_args: "--from-ref ${{ github.event.pull_request.base.sha }} --to-ref ${{ github.event.pull_request.head.sha }}"
4 changes: 2 additions & 2 deletions template/.pre-commit-config.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ repos:
- id: regenerate-charts
name: regenerate-charts
language: system
entry: make regenerate-charts
entry: nix-shell --run 'make regenerate-charts'
stages: [commit, merge-commit, manual]
pass_filenames: false

- id: cargo-test
name: cargo-test
language: system
entry: cargo test
entry: nix-shell --run 'cargo test'
stages: [commit, merge-commit, manual]
pass_filenames: false

0 comments on commit 56f72e0

Please sign in to comment.