Skip to content

Commit

Permalink
gh-actions/gcp/setup: Pin python version (<3.12) for gsutil install (
Browse files Browse the repository at this point in the history
…#2498)

Signed-off-by: Ryan Northey <[email protected]>
  • Loading branch information
phlax authored Dec 3, 2024
1 parent 06f3599 commit 86fbf5c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions gh-actions/gcp/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 86fbf5c

Please sign in to comment.