Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ All inputs are optional.
<td><code>components</code></td>
<td>Comma-separated string of additional components to install e.g. <code>clippy, rustfmt</code></td>
</tr>
<tr>
<td><code>set-default</code></td>
<td>Whether to set the installed toolchain as the active default via <code>rustup default &lt;toolchain&gt;</code>. Defaults to <code>true</code>. Set to <code>false</code> if you only plan to use the toolchain with explicit <code>+toolchain</code> overrides in your commands and don't want to change the runner's global default.</td>
</tr>
</table>

<br>
Expand Down
5 changes: 5 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ inputs:
components:
description: Comma-separated list of components to be additionally installed
required: false
set-default:
description: Whether to set the installed toolchain as the rustup default (rustup default <toolchain>)
required: false
default: 'true'

outputs:
cachekey:
Expand Down Expand Up @@ -94,6 +98,7 @@ runs:
shell: bash

- run: rustup default ${{steps.parse.outputs.toolchain}}
if: ${{inputs['set-default'] == 'true'}}
shell: bash
continue-on-error: true # https://github.com/dtolnay/rust-toolchain/issues/127

Expand Down
Loading