Add ability to pin rustup version #218
Description
Do the checklist before filing an issue:
- Is this related to the
actions-rs
Actions?
If you think it's a problem related to Github Actions in general, use GitHub Community forum instead: https://github.community - You've read the Contributing section about feature requests: https://github.com/actions-rs/.github/blob/master/CONTRIBUTING.md#feature-requests
- Is this something you can debug and fix? Send a pull request! Bug fixes and documentation fixes are welcome.
Motivation
Generally, the rustup
tool is stable across releases. However, the 1.25.0 release broke our GitHub Actions CI (rust-lang/rustup#3029). Since this is CI, any failures get in the critical path of our development workflow, so it's crucial to be able to roll out a fix as soon as possible. Pinning the rustup version to 1.24.3 should have been able to fix this problem, but there does not appear to be an easy way to do this in actions-rs.
Workflow example
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
rustup-version: 1.24.3
Additional context
I think the change would go here:
Line 50 in 4487ec1
Currently it always installs from a fixed path:
const rustupSh = await tc.downloadTool('https://sh.rustup.rs');
Instead, we would need to install from a path such as:
https://static.rust-lang.org/rustup/archive/1.24.3/x86_64-unknown-linux-gnu/rustup-init
Additionally, I am unsure of exactly how this works when there are multiple actions-rs steps in the same workflow. If one of them has the rustup version specified, and another has a different or missing rustup version, how do we determine which rustup version to install?