File tree Expand file tree Collapse file tree 2 files changed +58
-0
lines changed
Expand file tree Collapse file tree 2 files changed +58
-0
lines changed Original file line number Diff line number Diff line change 1+ # Setup Rust Action
2+
3+ Action to setup a rust environment.
4+
5+ ## Example
6+
7+ ``` yml
8+
9+ name : Build with rust
10+
11+ on :
12+ push :
13+
14+
15+ jobs :
16+ build :
17+ runs-on : ubuntu-latest
18+ steps :
19+ - name : Setup Rust
20+ uses : greenbone/actions/setup-rust@v3
21+ - name : Build
22+ run : |
23+ cargo build
24+ ` ` `
25+
26+ ## Action Configuration
27+
28+ | Input | Description | |
29+ | ------------ | ------------------------------------------------- | ------------------------------ |
30+ | rust-version | The rust version to setup, for example ` nightly`. | Optional (default is `stable`) |
Original file line number Diff line number Diff line change 1+ name : " Setup Rust Environment"
2+
3+ description : " A GitHub Action to set up a Rust environment."
4+
5+ inputs :
6+ rust-version :
7+ description : " The Rust version to install (default: stable)"
8+ required : false
9+ default : " stable"
10+
11+ runs :
12+ using : " composite"
13+ steps :
14+ - uses : actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
15+ with :
16+ path : |
17+ ~/.cargo/bin/
18+ ~/.cargo/registry/index/
19+ ~/.cargo/registry/cache/
20+ ~/.cargo/git/db/
21+ target/
22+ key : cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
23+ - name : Set up Rust
24+ run : rustup update ${{ inputs.rust-version }} && rustup default ${{ inputs.rust-version }} || rustup default ${{ inputs.rust-version }}
25+ shell : bash
26+ - name : Ensure linting and formatting tools are installed
27+ run : rustup component add rustfmt clippy
28+ shell : bash
You can’t perform that action at this time.
0 commit comments