diff --git a/.github/workflows/charts-release.yaml b/.github/workflows/charts-release.yaml index c4f99deb1ad..eb2799a8a43 100644 --- a/.github/workflows/charts-release.yaml +++ b/.github/workflows/charts-release.yaml @@ -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}"