From 86fbf5c46d848fc3f92b9915dba3f454a924e602 Mon Sep 17 00:00:00 2001 From: phlax Date: Tue, 3 Dec 2024 12:56:01 +0000 Subject: [PATCH] `gh-actions/gcp/setup`: Pin python version (<3.12) for gsutil install (#2498) Signed-off-by: Ryan Northey --- gh-actions/gcp/setup/action.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/gh-actions/gcp/setup/action.yml b/gh-actions/gcp/setup/action.yml index 9740c0636..1966991a8 100644 --- a/gh-actions/gcp/setup/action.yml +++ b/gh-actions/gcp/setup/action.yml @@ -14,6 +14,12 @@ inputs: default: description: | Path to copy key to. Must exist and be a directory. + python-version: + type: string + default: 3.12 + force-install: + type: boolean + default: false outputs: key-path: @@ -41,12 +47,12 @@ runs: echo "installed=true" >> $GITHUB_OUTPUT fi id: gsutil - if: ${{ inputs.key }} + if: ${{ inputs.key && ! fromJSON(inputs.force-install) }} shell: bash - uses: actions/setup-python@v5 if: ${{ inputs.key && steps.gsutil.outputs.installed != 'true' }} with: - python-version: "3.12" + python-version: ${{ inputs.python-version }} - if: ${{ inputs.key && steps.gsutil.outputs.installed != 'true' }} run: | pip install -r "${{ github.action_path }}/requirements.txt"