diff --git a/README.md b/README.md index f97b7aab8e..9c17a3b561 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,7 @@ jobs: args: "" gh_action_ref: "" # Not recommended for non-composite action use setup_python: "true" + python_version: "3.14" working_directory: "" requirements_file: "" ``` @@ -50,6 +51,7 @@ All the arguments are optional: - `requirements_file`: Path to the requirements.yml file to install role and collection dependencies. - `setup_python`: If python should be installed. Default is `true`. +- `python_version`: The version of python to install. Default is `3.14`. - `working_directory`: The directory where to run ansible-lint from. Default is `github.workspace`. Needed if you want to lint only a subset of your repository. diff --git a/action.yml b/action.yml index 5d27159489..9e1aed1257 100644 --- a/action.yml +++ b/action.yml @@ -14,6 +14,10 @@ inputs: description: If false, this action will not setup python and will instead rely on the already installed python. required: false default: "true" + python_version: + description: The version of Python to use when setting up Python environment. Default is 3.14. + required: false + default: "3.14" working_directory: description: The directory where to run ansible-lint from. Default is `github.workspace`. required: false @@ -81,7 +85,7 @@ runs: with: cache: pip cache-dependency-path: ${{ steps.get_reqs.outputs.reqs_file }} - python-version: "3.14" + python-version: ${{ inputs.python_version }} - name: Install ansible-lint shell: bash diff --git a/docs/installing.md b/docs/installing.md index f3db245dce..035a0d1f0c 100644 --- a/docs/installing.md +++ b/docs/installing.md @@ -120,6 +120,7 @@ jobs: with: args: "" setup_python: "true" + python_version: "3.14" working_directory: "" requirements_file: "" ``` @@ -128,6 +129,7 @@ All the arguments are optional and most users should not need them: - `args`: Arguments to be passed to ansible-lint command. - `setup_python`: If python should be installed. Default is `true`. +- `python_version`: Python version to be installed. Default is `3.14`. - `working_directory`: The directory where to run ansible-lint from. Default is `github.workspace`. That might be needed if you want to lint only a subset of your repository.