Skip to content

GitHub API rate limit in install script on GitHub Actions #163

@psviderski

Description

@psviderski

Jiralite on Discord got a 403 installing the CLI: https://github.com/thatskyapplication/thatskyapplication/actions/runs/19052532546/job/54415805274#step:5:1

403 was returned when trying to fetch the latest release version from github (https://api.github.com/repos/${GITHUB_REPO}/releases/latest):

api_url="https://api.github.com/repos/${GITHUB_REPO}/releases/latest"
VERSION=$(curl -fsSL "$api_url" | grep -o '"tag_name": "[^"]*' | cut -d'"' -f4)
if [ -z "$VERSION" ]; then
echo "Failed to fetch the latest version from GitHub."

It likely hit the github api rate limit (60 unauthenticated reqs/hour per IP). I think we need to pass the auth header if $GITHUB_TOKEN is defined (which is the default on GitHub Actions, no configuration is required).

And maybe add a few retries with sleep, just in case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions