Skip to content

Commit 454cd6c

Browse files
committed
fix(action): use github.action_path for requirements and .env paths
- cache-dependency-path now points to action's own requirements.txt instead of searching the caller's repo (fixes external repo usage) - .env.example copy now uses action_path prefix Closes non-forked repo setup-python cache error
1 parent 1acbb02 commit 454cd6c

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

DOCS/RELEASE.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,13 @@ Output:
120120

121121
## Changelog 📝
122122

123+
### v1.0.2 (2026-03-12)
124+
125+
**Bug Fixes:**
126+
- Fixed `cache-dependency-path` to use `${{ github.action_path }}/requirements.txt` so it resolves to the action's own file, not the caller's repo
127+
- Fixed `.env.example` copy path to use `${{ github.action_path }}/.env.example` for non-forked repos
128+
- Action now works correctly when used from any repository via GitHub Marketplace
129+
123130
### v1.0.1 (2026-03-12)
124131

125132
**Bug Fixes:**

action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ runs:
4343
with:
4444
python-version: ${{ inputs.python-version }}
4545
cache: "pip"
46-
cache-dependency-path: "**/requirements.txt"
46+
cache-dependency-path: "${{ github.action_path }}/requirements.txt"
4747

4848
- name: Install dependencies
4949
shell: bash
@@ -54,7 +54,7 @@ runs:
5454
- name: Create runtime .env for script
5555
shell: bash
5656
run: |
57-
cp .env.example .env
57+
cp ${{ github.action_path }}/.env.example .env
5858
printf "\nWAKA_API=%s\n" "${{ inputs.waka-api }}" >> .env
5959
printf "WAKA_TOKEN=%s\n" "${{ inputs.waka-token }}" >> .env
6060
printf "BAR_STYLE=%s\n" "${{ inputs.bar-style }}" >> .env

0 commit comments

Comments
 (0)