File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -113,11 +113,22 @@ jobs:
113113 path : rewatch/target
114114 key : rewatch-build-v3-${{ matrix.rust-target }}-${{ hashFiles('rewatch/src/**', 'rewatch/Cargo.lock') }}
115115
116+ - name : Determine Rust toolchain version
117+ id : rust-version
118+ shell : bash
119+ run : |
120+ version="$(awk -F '"' '/^rust-version[[:space:]]*=/ { print $2; exit }' rewatch/Cargo.toml)"
121+ if [ -z "$version" ]; then
122+ echo "rust-version missing in rewatch/Cargo.toml" >&2
123+ exit 1
124+ fi
125+ echo "version=${version}" >> "$GITHUB_OUTPUT"
126+
116127 - name : Install rust toolchain
117128 if : steps.rewatch-build-cache.outputs.cache-hit != 'true'
118129 uses : dtolnay/rust-toolchain@master
119130 with :
120- toolchain : 1.91.0
131+ toolchain : ${{ steps.rust-version.outputs.version }}
121132 targets : ${{ matrix.rust-target }}
122133 components : clippy, rustfmt
123134
You can’t perform that action at this time.
0 commit comments