Skip to content

Commit

Permalink
Update poetry installer with cache
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathangreen committed Mar 12, 2024
1 parent 42daa54 commit f3b3810
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions .github/actions/poetry/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,21 @@ outputs:
runs:
using: "composite"
steps:
- run: |
curl -sSL https://install.python-poetry.org | python - --yes --version ${{ inputs.version }}
echo "$HOME/.local/bin" >> $GITHUB_PATH
- uses: actions/cache@v4
id: cache
with:
path: $HOME/.poetry
key: ${{ runner.os }}-poetry-install-${{ inputs.version }}

- run: curl -sSL https://install.python-poetry.org | python - --yes --version ${{ inputs.version }}
env:
POETRY_HOME: $HOME/.poetry
if: steps.cache.outputs.cache-hit != 'true'
shell: bash

- run: echo "$POETRY_HOME/bin" >> $GITHUB_PATH
env:
POETRY_HOME: $HOME/.poetry
shell: bash

- id: poetry-version
Expand Down

0 comments on commit f3b3810

Please sign in to comment.