# Install Rust Toolchain via rust-toolchain.toml Fork of https://github.com/dtolnay/rust-toolchain that supports and makes it mandatory to use a rust-toolchain.toml file. ## Example workflow Create a [`rust-toolchain.toml`](https://rust-lang.github.io/rustup/overrides.html#the-toolchain-file) file: ```toml [toolchain] channel = "1.68" components = [ "rustfmt", "clippy" ] ``` Then add an entry to this action in your github actions: ```yaml name: test suite on: [push, pull_request] jobs: test: name: cargo test runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: dsherret/rust-toolchain-file@1 - run: cargo test --all-features ``` The selection of Rust toolchain is made based on the rust-toolchain.toml file. ## Inputs None. You must define everything in the rust-toolchain.toml file. ## Outputs
Name | Description |
---|---|
cachekey |
A short hash of the installed rustc version, appropriate for use as a cache key. "20220627a831" |
name |
Rustup's name for the selected version of the toolchain, like "1.62.0" . Suitable for use with cargo +${{steps.toolchain.outputs.name}} . |