fix(ci): poetry cache post-step failure on release workflows (#10881)

This commit is contained in:
César Arroba
2026-04-24 11:57:30 +02:00
committed by GitHub
parent 7a0e107617
commit ca79300440
4 changed files with 11 additions and 1 deletions
@@ -22,6 +22,10 @@ inputs:
description: 'Run `poetry lock` during setup. Only enable when a prior step mutates pyproject.toml (e.g. API `@master` VCS rewrite). Default: false.'
required: false
default: 'false'
enable-cache:
description: 'Whether to enable Poetry dependency caching via actions/setup-python'
required: false
default: 'true'
runs:
using: 'composite'
@@ -74,7 +78,9 @@ runs:
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
with:
python-version: ${{ inputs.python-version }}
cache: 'poetry'
# Disable cache when callers skip dependency install: Poetry 2.3.4 creates
# the venv in a path setup-python can't hash, breaking the post-step save-cache.
cache: ${{ inputs.enable-cache == 'true' && 'poetry' || '' }}
cache-dependency-path: ${{ inputs.working-directory }}/poetry.lock
- name: Install Python dependencies