File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,12 +23,17 @@ jobs:
2323
2424 - name : Pull Resolve-Plugin repository (latest release)
2525 env :
26+ GITHUB_TOKEN : ${{ github.token }}
2627 DISPATCH_TAG : ${{ github.event.client_payload.release_tag }}
2728 INPUT_TAG : ${{ github.event.inputs.resolve_plugin_tag }}
2829 run : |
2930 TARGET_TAG="${DISPATCH_TAG:-${INPUT_TAG:-}}"
3031 if [ -z "$TARGET_TAG" ]; then
31- TARGET_TAG=$(curl --fail -s https://api.github.com/repos/ClipABit/Resolve-Plugin/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
32+ TARGET_TAG=$(curl --fail --silent --show-error --retry 3 --retry-delay 2 \
33+ -H "Authorization: Bearer ${GITHUB_TOKEN}" \
34+ -H "Accept: application/vnd.github+json" \
35+ https://api.github.com/repos/ClipABit/Resolve-Plugin/releases/latest \
36+ | python3 -c 'import json,sys; print((json.load(sys.stdin) or {}).get("tag_name", ""))')
3237 if [ -z "$TARGET_TAG" ]; then
3338 echo "ERROR: Failed to fetch latest release tag from GitHub API"
3439 exit 1
You can’t perform that action at this time.
0 commit comments