fix(ci): ensure forgetool fetch is authenticated

This commit is contained in:
Kjeld Schouten
2026-06-09 08:37:19 +02:00
parent 45af9fdbc0
commit d89ff0b2f2
+9 -3
View File
@@ -62,10 +62,16 @@ jobs:
- name: Setup Forgetool
shell: bash
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
run: |-
TAG="$(curl -fsSL \
https://api.github.com/repos/trueforge-org/forgetool/releases/latest \
| jq -r '.tag_name')"
TAG=""
if RELEASES_JSON="$(curl -fsSL \
-H "Authorization: Bearer ${GITHUB_TOKEN}" \
-H "Accept: application/vnd.github+json" \
https://api.github.com/repos/trueforge-org/forgetool/releases/latest)"; then
TAG="$(jq -r '.tag_name // empty' <<< "${RELEASES_JSON}")"
fi
[ -n "${TAG}" ] && [ "${TAG}" != "null" ] || { echo "Failed to determine latest stable forgetool release tag"; exit 1; }
VERSION="${TAG#v}"
VERSION="${VERSION#forgetool-v}"