Skip to content

Commit

Permalink
Add override input (#11)
Browse files Browse the repository at this point in the history
* feat: ✨ Add an input to allow avoiding toolchain overriding

* ci: 🐛 Add override input

* docs: 📝 Update Inputs table
  • Loading branch information
SergioGasquez authored Sep 22, 2022
1 parent c454acd commit b7ce3a9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ jobs:
| `buildtargets` | Comma separated list of targets | string | _all_ |
| `version` | Which version of the toolchain to install | string | _latest_ |
| `ldproxy` | Whether to install `ldproxy` (required for `std`) | bool | `true` |
| `override` | Overrides the installed toolchain | bool | `true` |


All inputs are optional; if no inputs are provided:

Expand Down
7 changes: 5 additions & 2 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ inputs:
ldproxy:
description: Whether to install ldproxy (required for `std`)
default: true
override:
description: Whether to override the toolchain
default: true

runs:
using: composite
Expand All @@ -28,11 +31,11 @@ runs:
with:
profile: minimal
toolchain: stable
override: true
override: ${{ inputs.override }}
- name: Install Xtensa toolchain
shell: bash
run: |
[[ "${{ inputs.ldproxy }}" = true ]] && crates="ldproxy" || crates=""
${{ github.action_path }}/install.sh "$crates" ${{ inputs.version }} ${{ inputs.buildtargets }}
[[ "${{ inputs.default }}" = true ]] && rustup default esp || true
rustup override unset
[[ "${{ inputs.override }}" = true ]] && rustup override unset || true

0 comments on commit b7ce3a9

Please sign in to comment.