Skip to content

Commit fd4f5f0

Browse files
committed
setup-poetry: Add use-cache input and cache-hit output
1 parent df7a4b9 commit fd4f5f0

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

setup-poetry/action.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,17 @@ description: Install Poetry, add it to the PATH, and cache it to speed up workfl
33
inputs:
44
poetry-version:
55
default: 1.8.2
6+
use-cache:
7+
description: >
8+
A Boolean specifying whether to use the cache. Set this to false to work
9+
around caching problems.
10+
default: true
11+
outputs:
12+
cache-hit:
13+
description: >
14+
A Boolean indicating whether Poetry was loaded from the cache. This is
15+
mainly intended for testing the action.
16+
value: ${{ steps.cache-poetry.outputs.cache-hit }}
617
runs:
718
using: composite
819
steps:
@@ -38,6 +49,7 @@ runs:
3849
echo "poetry-home=$POETRY_HOME" >> "$GITHUB_OUTPUT"
3950
shell: bash
4051
- name: Cache poetry
52+
if: ${{ inputs.use-cache == 'true' }}
4153
id: cache-poetry
4254
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
4355
with:

0 commit comments

Comments
 (0)