fix(ci): Replace Mozilla sccache action with token-free alternative #985

Merged
tcpipuk merged 1 commit from tom/sccache-fix into main 2025-09-07 08:45:35 +00:00
Owner

Replace mozilla-actions/sccache-action with a custom Forgejo-specific implementation that eliminates GitHub token dependencies.

The new action (https://git.tomfos.tr/tom/sccache-action) mirrors sccache binaries to the Forgejo package registry and queries that instead of GitHub releases, removing rate limiting issues for all contributors regardless of repository permissions.

Replace mozilla-actions/sccache-action with a custom Forgejo-specific implementation that eliminates GitHub token dependencies. The new action (https://git.tomfos.tr/tom/sccache-action) mirrors sccache binaries to the Forgejo package registry and queries that instead of GitHub releases, removing rate limiting issues for all contributors regardless of repository permissions.
tcpipuk self-assigned this 2025-09-06 18:59:53 +00:00
Author
Owner

I'll update the name and description of this PR in a bit, but in short, I've forked the sccache-action and updated it to be specifically designed for Forgejo.

In long, it uses a Forgejo workflow to mirror the sccache binaries to the package registry, then the action queries the registry to find the latest package - other than that, it should work identically to the original, including using the hostedtoolcache as you can see in the example run I've just done:

Querying Forgejo packages API: https://git.tomfos.tr/api/v1/packages/tom?type=generic&q=sccache
Found latest version: v0.10.0
try to setup sccache version: v0.10.0
sccache download from url: https://git.tomfos.tr/api/packages/tom/generic/sccache/v0.10.0/sccache-v0.10.0-x86_64-unknown-linux-musl.tar.gz
Correct checksum: 1fbb35e135660d04a2d5e42b59c7874d39b3deb17de56330b25b713ec59f849b
[command]/usr/bin/tar xz --warning=no-unknown-keyword --overwrite -C /tmp/cb3bea40-7911-41dd-b790-ef3b3f155d17 -f /tmp/e191f680-7ce2-4f5f-a94c-e24fc0287cbf
sccache extracted to: /tmp/cb3bea40-7911-41dd-b790-ef3b3f155d17
sccache cached to: /opt/hostedtoolcache/sccache/0.10.0/x64

Cloning the action to use your own copy is easy (just update the default repo/owner in action.yml) but I'm happy to take the minimal traffic this will cause and I don't have any ratelimiting that'll cause it to fail 😉

I'll update the name and description of this PR in a bit, but in short, I've [forked the sccache-action](https://git.tomfos.tr/tom/sccache-action) and updated it to be specifically designed for Forgejo. In long, it uses a Forgejo workflow to mirror the sccache binaries to the package registry, then the action queries the registry to find the latest package - other than that, it should work _identically_ to the original, including using the hostedtoolcache as you can see in the example run I've just done: ``` Querying Forgejo packages API: https://git.tomfos.tr/api/v1/packages/tom?type=generic&q=sccache Found latest version: v0.10.0 try to setup sccache version: v0.10.0 sccache download from url: https://git.tomfos.tr/api/packages/tom/generic/sccache/v0.10.0/sccache-v0.10.0-x86_64-unknown-linux-musl.tar.gz Correct checksum: 1fbb35e135660d04a2d5e42b59c7874d39b3deb17de56330b25b713ec59f849b [command]/usr/bin/tar xz --warning=no-unknown-keyword --overwrite -C /tmp/cb3bea40-7911-41dd-b790-ef3b3f155d17 -f /tmp/e191f680-7ce2-4f5f-a94c-e24fc0287cbf sccache extracted to: /tmp/cb3bea40-7911-41dd-b790-ef3b3f155d17 sccache cached to: /opt/hostedtoolcache/sccache/0.10.0/x64 ``` Cloning the action to use your own copy is easy (just update [the default repo/owner in action.yml](https://git.tomfos.tr/tom/sccache-action/src/branch/main/action.yml)) but I'm happy to take the minimal traffic this will cause and I don't have any ratelimiting that'll cause it to fail 😉
tcpipuk changed title from fix(ci): Use runner GH_PUBLIC_RO token for sccache to fix(ci): Replace Mozilla sccache action with token-free alternative 2025-09-07 08:14:46 +00:00
tcpipuk force-pushed tom/sccache-fix from 9a0dfb74dc
All checks were successful
Documentation / Build and Deploy Documentation (pull_request) Successful in 44s
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 1m13s
Checks / Prek / Clippy and Cargo Tests (pull_request) Successful in 5m47s
Release Docker Image / define-variables (pull_request) Successful in 5s
Release Docker Image / build-image (linux/amd64, release, linux-amd64, base) (pull_request) Successful in 9m9s
Release Docker Image / build-image (linux/arm64, release, linux-arm64, base) (pull_request) Successful in 9m17s
Release Docker Image / merge (pull_request) Successful in 9s
to 1a3107c20a
All checks were successful
Release Docker Image / define-variables (pull_request) Successful in 18s
Documentation / Build and Deploy Documentation (pull_request) Successful in 1m15s
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 1m40s
Checks / Prek / Clippy and Cargo Tests (pull_request) Successful in 3m45s
Release Docker Image / build-image (linux/arm64, release, linux-arm64, base) (pull_request) Successful in 6m27s
Release Docker Image / build-image (linux/amd64, release, linux-amd64, base) (pull_request) Successful in 6m20s
Release Docker Image / merge (pull_request) Successful in 7s
Documentation / Build and Deploy Documentation (push) Successful in 34s
Checks / Prek / Pre-commit & Formatting (push) Successful in 1m20s
Checks / Prek / Clippy and Cargo Tests (push) Successful in 3m27s
Release Docker Image / define-variables (push) Successful in 6s
Release Docker Image / build-image (linux/amd64, release, linux-amd64, base) (push) Successful in 11m47s
Release Docker Image / build-image (linux/arm64, release, linux-arm64, base) (push) Successful in 11m56s
Release Docker Image / merge (push) Successful in 19s
2025-09-07 08:33:33 +00:00
Compare
tcpipuk deleted branch tom/sccache-fix 2025-09-07 08:45:35 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
continuwuation/continuwuity!985
No description provided.