2
0
Fork 0
mirror of https://git.asonix.dog/asonix/pict-rs synced 2024-12-22 11:21:24 +00:00

Add rust version to inputs

This commit is contained in:
asonix 2024-02-07 19:38:28 -06:00
parent 4f3d11bc2a
commit 7d1037c947

View file

@ -6,6 +6,10 @@ inputs:
description: "JSON Array of targets to add to rustup" description: "JSON Array of targets to add to rustup"
required: false required: false
default: '[]' default: '[]'
rust-version:
description: "Version of rust to install"
required: true
default: '1.75.0'
runs: runs:
using: "composite" using: "composite"
@ -27,11 +31,11 @@ runs:
~/.cargo/git/db ~/.cargo/git/db
~/.rustup ~/.rustup
target/ target/
key: rust-${{ join(fromJSON(inputs.targets), '-') }}-${{ hashFiles('Cargo.toml') }}-${{ hashFiles('Cargo.lock')}} key: rust-${{ inputs.rust-version }}-${{ join(fromJSON(inputs.targets), '-') }}-${{ hashFiles('Cargo.toml') }}-${{ hashFiles('Cargo.lock')}}
- -
name: Install rustup and rust name: Install rustup and rust
if: steps.cache.outputs.cache-hit != 'true' if: steps.cache.outputs.cache-hit != 'true'
uses: https://github.com/dtolnay/rust-toolchain@1.75.0 uses: https://github.com/dtolnay/rust-toolchain@${{ inputs.rust-version }}
with: with:
components: clippy components: clippy
targets: ${{ join(fromJSON(inputs.targets), ',') }} targets: ${{ join(fromJSON(inputs.targets), ',') }}