Skip to content

Commit f631e43

Browse files
committed
Add hash of install-args to the cache key
1 parent 5228886 commit f631e43

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

analyze-project/action.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,17 @@ runs:
3838
- name: Check for lock changes
3939
run: poetry check --lock -C "${{ inputs.project-directory }}"
4040
shell: bash
41+
- name: Generate install args hash
42+
id: install_args_hash
43+
run: |
44+
install_args_hash=$(echo "${{ inputs.install-args }}" | sha256sum | cut -d ' ' -f1)
45+
echo "hash=$install_args_hash" >> "$GITHUB_OUTPUT"
46+
shell: bash
4147
- name: Cache virtualenv
4248
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
4349
with:
4450
path: ${{ steps.get_project_info.outputs.venv-path }}
45-
key: ${{ steps.get_project_info.outputs.name }}-${{ runner.os }}-py${{ env.pythonVersion }}-${{ hashFiles(format('{0}/poetry.lock', inputs.project-directory)) }}
51+
key: ${{ steps.get_project_info.outputs.name }}-${{ runner.os }}-py${{ env.pythonVersion }}-${{ hashFiles(format('{0}/poetry.lock', inputs.project-directory)) }}-${{ steps.install_args_hash.outputs.hash }}
4652
- name: Install ${{ steps.get_project_info.outputs.name }}
4753
run: |
4854
install_cmd="poetry install -v"

0 commit comments

Comments
 (0)