Skip to content

Commit

Permalink
ci: Fix cache key
Browse files Browse the repository at this point in the history
  • Loading branch information
malmeloo committed Sep 3, 2024
1 parent bf7e3e4 commit 9104d55
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/actions/setup-project/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,19 @@ runs:
with:
python-version: ${{ inputs.python-version }}

- name: Get cache key
id: cache-key
shell: bash
run: |
key=$(echo "${{ inputs.dependency-groups }}" | sed 's/,/+/')
echo "key=$key" >> "$GITHUB_OUTPUT"
- name: Load cached venv
id: cache-dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-python-${{ inputs.python-version }}-groups-${{ inputs.dependency-groups }}-lock-${{ hashFiles('**/poetry.lock') }}
key: venv-${{ runner.os }}-python-${{ inputs.python-version }}-groups-${{ steps.cache-key.outputs.key }}-${{ hashFiles('**/poetry.lock') }}

- name: Install dependencies
if: steps.cache-dependencies.outputs.cache-hit != 'true'
Expand Down

0 comments on commit 9104d55

Please sign in to comment.