From 11c7ac09c3f3585a8c61920e0f15eea041e586d3 Mon Sep 17 00:00:00 2001 From: Sewer56 Date: Mon, 6 Apr 2026 02:35:57 +0100 Subject: [PATCH] Fixed: Pass GITHUB_TOKEN to cargo-binstall for higher rate limits When cargo-binstall installs packages from GitHub releases, it queries the GitHub API. Without authentication, this is limited to 60 req/hr, causing 403 Forbidden errors in CI. The fix passes GITHUB_TOKEN via environment variable, which gives: - 1000 req/hr rate limit (vs 60 unauthenticated) - Avoids fallback to cargo install from source --- action.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/action.yml b/action.yml index 305f5e8..70a9344 100644 --- a/action.yml +++ b/action.yml @@ -196,10 +196,14 @@ runs: - name: Install cargo-binstall if: inputs.install-binstall == 'true' uses: cargo-bins/cargo-binstall@main + env: + GITHUB_TOKEN: ${{ github.token }} - name: Install Tarpaulin (via binstall) if: inputs.use-cross == 'false' && inputs.use-tarpaulin == 'true' && inputs.use-binstall == 'true' shell: bash + env: + GITHUB_TOKEN: ${{ github.token }} run: | # The force here is kinda forced for back compat reasons, else cargo might not pick up the binary; # while binstall thinks it's there due to caching. Current versions wouldn't cache preinstalled cargo-tarpaulin