Skip to content

Commit 80d00c4

Browse files
ci(template): Install Nix in pre-commit workflow (#516)
* ci(template): Install Nix in pre-commit workflow * Apply suggestions from code review * chore: Extend comment about Nix version * Apply suggestions from code review --------- Co-authored-by: Nick <[email protected]>
1 parent e0b7027 commit 80d00c4

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

config/versions.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,10 @@ hadolint_version: v2.12.0
2323
# If you change the Python version here, make sure to also change it in
2424
# .github/workflows/pr_pre-commit.yml
2525
python_version: 3.12
26+
27+
# This Nix version is used in the operators pre-commit workflow as they require
28+
# Nix to run some checks. Check for new versions here:
29+
# https://github.com/NixOS/nix/tags
30+
# Usually the latest version should just work and as such the version here can
31+
# be bumped without any constraints.
32+
nix_pkg_manager_version: 2.28.3

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66

77
env:
88
CARGO_TERM_COLOR: always
9+
NIX_PKG_MANAGER_VERSION: "{[ nix_pkg_manager_version }]"
910
RUST_TOOLCHAIN_VERSION: "{[ rust_nightly_version }]"
1011
HADOLINT_VERSION: "{[ hadolint_version }]"
1112
PYTHON_VERSION: "{[ python_version }]"
@@ -29,3 +30,5 @@ jobs:
2930
python-version: ${{ env.PYTHON_VERSION }}
3031
rust: ${{ env.RUST_TOOLCHAIN_VERSION }}
3132
hadolint: ${{ env.HADOLINT_VERSION }}
33+
nix: ${{ env.NIX_PKG_MANAGER_VERSION }}
34+
nix-github-token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)