From 9a0dfb74dcac3fcaf7be4dc8106b9461bb5dd60e Mon Sep 17 00:00:00 2001 From: Tom Foster Date: Sun, 7 Sep 2025 08:34:28 +0100 Subject: [PATCH] fix(ci): Replace Mozilla sccache action with token-free alternative Switch from mozilla-actions/sccache-action to git.tomfos.tr/tom/sccache-action@v1 which eliminates GitHub token requirements for downloading sccache binaries. Removes token input parameter and debug logging from sccache action, and simplifies setup-rust action by removing sccache token availability checks. This ensures reliable sccache access for all contributors regardless of repository permissions or rate limits. --- .forgejo/actions/sccache/action.yml | 8 +------- .forgejo/actions/setup-rust/action.yml | 14 +------------- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/.forgejo/actions/sccache/action.yml b/.forgejo/actions/sccache/action.yml index 8e5e24cb..b2441109 100644 --- a/.forgejo/actions/sccache/action.yml +++ b/.forgejo/actions/sccache/action.yml @@ -2,18 +2,12 @@ name: sccache description: | Install sccache for caching builds in GitHub Actions. -inputs: - token: - description: 'A Github PAT' - required: false runs: using: composite steps: - name: Install sccache - uses: https://github.com/mozilla-actions/sccache-action@v0.0.9 - with: - token: ${{ env.GH_PUBLIC_RO || inputs.token }} + uses: https://git.tomfos.tr/tom/sccache-action@v1 - name: Configure sccache uses: https://github.com/actions/github-script@v7 with: diff --git a/.forgejo/actions/setup-rust/action.yml b/.forgejo/actions/setup-rust/action.yml index f59a2140..a8736a75 100644 --- a/.forgejo/actions/setup-rust/action.yml +++ b/.forgejo/actions/setup-rust/action.yml @@ -88,21 +88,9 @@ runs: # Shared toolchain cache across all Rust versions key: toolchain-${{ steps.runner-os.outputs.slug }} - - name: Debug GitHub token availability - shell: bash - run: | - if [ -n "$GH_PUBLIC_RO" ]; then - echo "✅ Using GH_PUBLIC_RO environment variable for sccache" - elif [ -z "${{ inputs.github-token }}" ]; then - echo "⚠️ No GitHub token provided - sccache will use fallback download method" - else - echo "✅ Using github-token input for sccache" - fi - name: Setup sccache - uses: https://github.com/mozilla-actions/sccache-action@v0.0.9 - with: - token: ${{ env.GH_PUBLIC_RO || inputs.github-token }} + uses: https://git.tomfos.tr/tom/sccache-action@v1 - name: Cache build artifacts id: build-cache