Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
hugoalh committed Sep 12, 2023
1 parent b302fef commit e875703
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 49 deletions.
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,15 @@ jobs:
## 🧩 Input
> **ℹ️ Notice:** All of the inputs are optional; Use this action without any input will default to install latest version for current user, and keep the setting that modified.
### `sudo`

**(>= v1.5.0) \[Optional\]** `<Boolean = False>` Whether to execute this action in sudo mode on non-Windows environment. This must set to `True` in order to able install for all users on non-Windows environment (i.e.: when input [`scope`](#scope) is `"AllUsers"`).
**(>= v1.5.0)** `<Boolean = False>` Whether to execute this action in sudo mode on non-Windows environment. This must set to `True` in order to able install for all users on non-Windows environment (i.e.: when [input `scope`](#scope) is `"AllUsers"`).

### `version`

**\[Optional\]** `<String = "Latest">` Target version, by Semantic Versioning (SemVer) 2.0.0 with optional modifier; Default to the latest version.
`<String = "Latest">` Target version, by Semantic Versioning (SemVer) 2.0.0 with optional modifier; Default to the latest version.

- **`Latest`:** Latest version
- **`<Ma.Mi.Pa-PR+Bu`:** Less than version `Ma.Mi.Pa-PR+Bu`
Expand All @@ -48,22 +50,22 @@ jobs:

### `allowprerelease`

**\[Optional\]** `<Boolean = False>` Whether to allow target pre release version.
`<Boolean = False>` Whether to allow target pre release version.

### `scope`

**(>= v1.5.0) \[Optional\]** `<String = "CurrentUser">` Installation scope.
**(>= v1.5.0)** `<String = "CurrentUser">` Installation scope.

- **`"AllUsers"`:** For all users. Also need to set input [`sudo`](#sudo) to `True`.
- **`"AllUsers"`:** For all users. Also need to set [input `sudo`](#sudo) to `True`.
- **`"CurrentUser"`:** For current user.

### `force`

**(>= v1.5.0) \[Optional\]** `<Boolean = False>` Whether to force install or reinstall target (pre release) version.
**(>= v1.5.0)** `<Boolean = False>` Whether to force install or reinstall target (pre release) version.

### `keepsetting`

**\[Optional\]** `<Boolean = True>` Whether to keep the setting that modified by this action.
`<Boolean = True>` Whether to keep the setting that modified by this action.

## 🧩 Output

Expand Down
42 changes: 0 additions & 42 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,48 +71,6 @@ runs:
INPUT_SCOPE: "${{inputs.scope}}"
INPUT_SUDO: "${{inputs.sudo}}"
INPUT_VERSION: "${{inputs.toolkit_version || inputs.version}}"
# - name: "Throw Error - Input `sudo`"
# if: "${{inputs.sudo != 'False' && inputs.sudo != 'True'}}"
# run: |
# Write-Host -Object '::error::Input `sudo` is not a boolean!'
# Exit 1
# shell: "pwsh"
# - name: "Main (Non-Windows)"
# if: "${{runner.os != 'Windows' && inputs.sudo == 'False'}}"
# env:
# INPUT_ALLOWPRERELEASE: "${{inputs.toolkit_allowprerelease || inputs.allowprerelease}}"
# INPUT_FORCE: "${{inputs.force}}"
# INPUT_KEEPSETTING: "${{inputs.keepsetting}}"
# INPUT_SCOPE: "${{inputs.scope}}"
# INPUT_SUDO: "${{inputs.sudo}}"
# INPUT_VERSION: "${{inputs.toolkit_version || inputs.version}}"
# run: |
# pwsh -NonInteractive "$GITHUB_ACTION_PATH/main.ps1"
# shell: "sh"
# - name: "Main (Non-Windows, Sudo)"
# if: "${{runner.os != 'Windows' && inputs.sudo == 'True'}}"
# env:
# INPUT_ALLOWPRERELEASE: "${{inputs.toolkit_allowprerelease || inputs.allowprerelease}}"
# INPUT_FORCE: "${{inputs.force}}"
# INPUT_KEEPSETTING: "${{inputs.keepsetting}}"
# INPUT_SCOPE: "${{inputs.scope}}"
# INPUT_SUDO: "${{inputs.sudo}}"
# INPUT_VERSION: "${{inputs.toolkit_version || inputs.version}}"
# run: |
# sudo --non-interactive --preserve-env pwsh -NonInteractive "$GITHUB_ACTION_PATH/main.ps1"
# shell: "sh"
# - name: "Main (Windows)"
# if: "${{runner.os == 'Windows'}}"
# env:
# INPUT_ALLOWPRERELEASE: "${{inputs.toolkit_allowprerelease || inputs.allowprerelease}}"
# INPUT_FORCE: "${{inputs.force}}"
# INPUT_KEEPSETTING: "${{inputs.keepsetting}}"
# INPUT_SCOPE: "${{inputs.scope}}"
# INPUT_SUDO: "${{inputs.sudo}}"
# INPUT_VERSION: "${{inputs.toolkit_version || inputs.version}}"
# run: |
# pwsh -NonInteractive (Join-Path -Path $Env:GITHUB_ACTION_PATH -ChildPath 'main.ps1')
# shell: "pwsh"
branding:
icon: "package"
color: "blue"

0 comments on commit e875703

Please sign in to comment.