simonw / til

Today I Learned
https://til.simonwillison.net
Apache License 2.0
1.02k stars 81 forks source link

Build failed with GitHub ratelimit error on Markdown #87

Closed simonw closed 5 months ago

simonw commented 5 months ago

https://github.com/simonw/til/actions/runs/7673134644/job/20915103157

CleanShot 2024-01-26 at 12 47 20@2x

Relevant code: https://github.com/simonw/til/blob/5f7591a48b7e8ba9efdb67e8a346abeb40c63e2d/build_database.py#L73-L104

I don't have a MARKDOWN_GITHUB_TOKEN set in GitHub Actions so it's using the default anonymous rate limit which is very low.

simonw commented 5 months ago

I'll try fixing that with:

      env:
        MARKDOWN_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

https://docs.github.com/en/actions/security-guides/automatic-token-authentication

simonw commented 5 months ago

That fixed it.