Skip to content

Commit

Permalink
ci: try with PIPX_BIN_DIR again
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleKing committed Sep 8, 2023
1 parent 1d27e7f commit 268513d
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,27 +23,36 @@ runs:
id: variable-setup
run: |
echo "pipx-home=$PIPX_HOME" >> $GITHUB_OUTPUT
echo "pipx-bin-dir=$PIPX_BIN_DIR" >> $GITHUB_OUTPUT
export OS_PYTHON=${{ inputs.os }}-${{ inputs.python-version }}
export BASE64_PIPX_ID=$(echo 'poetry==${{ inputs.poetry-version }} ${{ inputs.pipx-packages }}' | base64)
echo "cache-key-pipx=pipx-$OS_PYTHON-$BASE64_PIPX_ID" >> $GITHUB_OUTPUT
export BASE64_PIPX_ID=$(echo -n 'poetry==${{ inputs.poetry-version }} ${{ inputs.pipx-packages }}' | base64)
echo "cache-key-pipx=pipx-${{ inputs.os }}-${{ inputs.python-version }}-$BASE64_PIPX_ID" >> $GITHUB_OUTPUT
shell: bash

- name: Cache pipx
id: cache-pipx
uses: actions/cache@v3
with:
# https://pypa.github.io/pipx/how-pipx-works
path: ${{ steps.variable-setup.outputs.pipx-home }}
path: |
${{ steps.variable-setup.outputs.pipx-home }}
${{ steps.variable-setup.outputs.pipx-bin-dir }}
key: ${{ steps.variable-setup.outputs.cache-key-pipx }}

- name: Install Poetry ${{ inputs.poetry-version }} and '${{ inputs.pipx-packages }}'
if: ${{ steps.cache-pipx.outputs.cache-hit != 'true' }}
run: |
for tool in "poetry==${{ inputs.poetry-version }}" ${{ inputs.pipx-packages }}; do
pipx install $tool
done
shell: bash

- name: Debug pipx
run: |
pipx ensurepath
pipx list
shell: bash

- name: Setup Python ${{ inputs.python-version }}
uses: actions/setup-python@v4
with:
Expand Down

0 comments on commit 268513d

Please sign in to comment.