Skip to content

Commit

Permalink
Add force option documentation in readme and action.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
MatteoH2O1999 committed Jun 7, 2023
1 parent de4e7e4 commit a5668f5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ This action supports the following inputs (in bold are the names of the exclusiv
|cache-dependency-path|Used to specify the path to dependency files. Supports wildcards or a list of file names for caching multiple dependencies.|example: `path/to/dependency/files`|`''`|
|update-environment|Set this option if you want the action to update environment variables.|`true`, `false`|`true`|
|**cache-build**|Whether to cache the built Python distribution to speed up successive runs.|`true`, `false`|`false`|
|**allow-build**|Set the behavior of the action when [actions/setup-python](https://github.com/actions/setup-python) fails and has to be built from source.|`allow`, `info`, `warn`, `error`|`warn`|
|**allow-build**|Set the behavior of the action when [actions/setup-python](https://github.com/actions/setup-python) fails and has to be built from source.|`allow`, `info`, `warn`, `error`, `force`|`warn`|

### allow-build input

Expand All @@ -136,7 +136,8 @@ This action can apply for different behaviors when it tries to install a CPython
- `error` this emulates [actions/setup-python](https://github.com/actions/setup-python) and throws an error (thus failing the job) if the Python version cannot be downloaded from [actions/python-versions](https://github.com/actions/python-versions);
- `warn`(default) this will proceed to build the specified version of CPython but will still throw a warning. This was chosen as the default behavior as the user may not know a deprecated version has been requested;
- `info` this will build from source and only print to the logs the fact that a specific Python version will be built from source;
- `allow` same as `info` but does not even print to logs the fact that CPython will be built from source.
- `allow` same as `info` but does not even print to logs the fact that CPython will be built from source;
- `force` this will force Python to be built from source regardless of whether [actions/setup-python](https://github.com/actions/setup-python) supports it or not.

## Outputs

Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ inputs:
default: false
allow-build:
required: false
description: "Set the behavior of the action when actions/setup-python fails and has to be built from source. Supported values: allow, info, warn, error. Default: warn"
description: "Set the behavior of the action when actions/setup-python fails and has to be built from source. Supported values: allow, info, warn, error, force. Default: warn"
default: warn
allow-prereleases:
description: "When 'true', a version range passed to 'python-version' input will match prerelease versions if no GA versions are found. Only 'x.y' version range is supported for CPython."
Expand Down

0 comments on commit a5668f5

Please sign in to comment.