Concise GitHub Action for installing a Rust toolchain
Find a file
2023-03-09 15:21:05 -05:00
.github Only support a rust-toolchain.toml file 2023-03-09 15:21:05 -05:00
action.yml Only support a rust-toolchain.toml file 2023-03-09 15:21:05 -05:00
LICENSE Add MIT license 2021-10-09 02:41:20 +01:00
README.md Only support a rust-toolchain.toml file 2023-03-09 15:21:05 -05:00

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 file:

[toolchain]
channel = "1.68"
components = [ "rustfmt", "clippy" ]

Then add an entry to this action in your github actions:

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}}.

License

The scripts and documentation in this project are released under the MIT License.