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 42e55d9
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/actions/setup-project/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,21 @@ runs:
with:
python-version: ${{ inputs.python-version }}

- name: Get cache key
id: cache-key
outputs:
- key
shell: bash
run: |
key=$(echo "${{ inputs.dependency-groups }}" sed 's/,/+/')
echo "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 }}-${{ hashFiles('**/poetry.lock') }}

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

0 comments on commit 42e55d9

Please sign in to comment.