Skip to content

Commit 9e39570

Browse files
committed
fix(action): remove setup-python pip cache to fix cross-repo path error
setup-python cache-dependency-path only matches files within the caller's workspace, so it cannot reference the action's own requirements.txt. Remove cache/cache-dependency-path entirely. pip install in the next step handles dependencies directly.
1 parent fda1218 commit 9e39570

1 file changed

Lines changed: 2 additions & 9 deletions

File tree

action.yml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,28 +38,21 @@ outputs:
3838
runs:
3939
using: "composite"
4040
steps:
41-
- name: Resolve action absolute path
42-
id: action-path
43-
shell: bash
44-
run: echo "abs=$(cd '${{ github.action_path }}' && pwd)" >> "$GITHUB_OUTPUT"
45-
4641
- name: Set up Python
4742
uses: actions/setup-python@v5
4843
with:
4944
python-version: ${{ inputs.python-version }}
50-
cache: "pip"
51-
cache-dependency-path: "${{ steps.action-path.outputs.abs }}/requirements.txt"
5245

5346
- name: Install dependencies
5447
shell: bash
5548
run: |
5649
python -m pip install --upgrade pip
57-
pip install -r ${{ steps.action-path.outputs.abs }}/requirements.txt
50+
pip install -r ${{ github.action_path }}/requirements.txt
5851
5952
- name: Create runtime .env for script
6053
shell: bash
6154
run: |
62-
cp ${{ steps.action-path.outputs.abs }}/.env.example .env
55+
cp ${{ github.action_path }}/.env.example .env
6356
printf "\nWAKA_API=%s\n" "${{ inputs.waka-api }}" >> .env
6457
printf "WAKA_TOKEN=%s\n" "${{ inputs.waka-token }}" >> .env
6558
printf "BAR_STYLE=%s\n" "${{ inputs.bar-style }}" >> .env

0 commit comments

Comments
 (0)