Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: generate releases.json on release event #1563

Merged
merged 2 commits into from
Jan 30, 2023

Commits on Jan 30, 2023

  1. ci: generate releases.json on release event

    We are currently using the GitHub API in our setup-buildx-action
    to check for latest and tagged releases to make sure they exist
    before download. But this requires using a token to avoid
    rate-limit. It's fine for public runners but GHES runners don't
    have the `github.token` populated automatically. They need to
    create a PAT.
    
    This PR will solve this issue by generating and pushing a
    `releases.json` file in this repo when we publish a GitHub Release
    that will then be fetched through `raw.githubusercontent.com`
    endpoint on `setup-buildx-action` repo. This endpoint is better
    served for our purpose with 5000 requests per hour compared to the
    GitHub API endpoint that is limited to 60 requests per hour (unauth)
    and 1000 request per hour when authenticated.
    
    Also ignore .github/releases.json file on pull request event as an
    action in a workflow run can't trigger a new workflow run anyway.
    See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#example-using-more-than-one-event
    
    Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
    crazy-max committed Jan 30, 2023
    Configuration menu
    Copy the full SHA
    36d95bd View commit details
    Browse the repository at this point in the history
  2. github: update .github/releases.json

    Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
    crazy-max committed Jan 30, 2023
    Configuration menu
    Copy the full SHA
    ea4bec2 View commit details
    Browse the repository at this point in the history