Skip to content

Commit 8310a6c

Browse files
authored
chore: Make it easier for individual operators to upgrade rust before templating (#319)
* make it easier for individual operators to upgrade rust before templating (#317) * add missing replacement
1 parent b213064 commit 8310a6c

File tree

1 file changed

+22
-7
lines changed

1 file changed

+22
-7
lines changed

template/.github/workflows/build.yml.j2

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ env:
2121
CARGO_TERM_COLOR: always
2222
CARGO_INCREMENTAL: '0'
2323
CARGO_PROFILE_DEV_DEBUG: '0'
24+
RUST_TOOLCHAIN_VERSION: "{[ rust_version }]"
2425
RUSTFLAGS: "-D warnings"
2526
RUSTDOCFLAGS: "-D warnings"
2627
RUST_LOG: "info"
@@ -44,7 +45,9 @@ jobs:
4445
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
4546
with:
4647
submodules: recursive
47-
- uses: dtolnay/rust-toolchain@{[ rust_version }]
48+
- uses: dtolnay/rust-toolchain@be73d7920c329f220ce78e0234b8f96b7ae60248
49+
with:
50+
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
4851
- uses: Swatinem/rust-cache@3cf7f8cc28d1b4e7d01e3783be10a97d55d483c8 # v2.7.1
4952
with:
5053
key: udeps
@@ -122,7 +125,9 @@ jobs:
122125
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
123126
with:
124127
submodules: recursive
125-
- uses: dtolnay/rust-toolchain@{[ rust_version }]
128+
- uses: dtolnay/rust-toolchain@be73d7920c329f220ce78e0234b8f96b7ae60248
129+
with:
130+
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
126131
with:
127132
components: rustfmt
128133
- run: cargo fmt --all -- --check
@@ -139,7 +144,9 @@ jobs:
139144
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
140145
with:
141146
submodules: recursive
142-
- uses: dtolnay/rust-toolchain@{[ rust_version }]
147+
- uses: dtolnay/rust-toolchain@be73d7920c329f220ce78e0234b8f96b7ae60248
148+
with:
149+
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
143150
with:
144151
components: clippy
145152
- uses: Swatinem/rust-cache@3cf7f8cc28d1b4e7d01e3783be10a97d55d483c8 # v2.7.1
@@ -174,7 +181,9 @@ jobs:
174181
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
175182
with:
176183
submodules: recursive
177-
- uses: dtolnay/rust-toolchain@{[ rust_version }]
184+
- uses: dtolnay/rust-toolchain@be73d7920c329f220ce78e0234b8f96b7ae60248
185+
with:
186+
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
178187
with:
179188
components: rustfmt
180189
- uses: Swatinem/rust-cache@3cf7f8cc28d1b4e7d01e3783be10a97d55d483c8 # v2.7.1
@@ -195,7 +204,9 @@ jobs:
195204
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
196205
with:
197206
submodules: recursive
198-
- uses: dtolnay/rust-toolchain@{[ rust_version }]
207+
- uses: dtolnay/rust-toolchain@be73d7920c329f220ce78e0234b8f96b7ae60248
208+
with:
209+
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
199210
- uses: Swatinem/rust-cache@3cf7f8cc28d1b4e7d01e3783be10a97d55d483c8 # v2.7.1
200211
with:
201212
key: test
@@ -258,7 +269,9 @@ jobs:
258269
with:
259270
version: v3.13.3
260271
- name: Set up cargo
261-
uses: dtolnay/rust-toolchain@{[ rust_version }]
272+
uses: dtolnay/rust-toolchain@be73d7920c329f220ce78e0234b8f96b7ae60248
273+
with:
274+
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
262275
- uses: Swatinem/rust-cache@3cf7f8cc28d1b4e7d01e3783be10a97d55d483c8 # v2.7.1
263276
with:
264277
key: charts
@@ -318,7 +331,9 @@ jobs:
318331
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
319332
with:
320333
submodules: recursive
321-
- uses: dtolnay/rust-toolchain@{[ rust_version }]
334+
- uses: dtolnay/rust-toolchain@be73d7920c329f220ce78e0234b8f96b7ae60248
335+
with:
336+
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
322337
with:
323338
components: rustfmt
324339
# This step checks if the current run was triggered by a push to a pr (or a pr being created).

0 commit comments

Comments
 (0)