Fix Forgejo Actions cache backend (actions/cache@v4 always misses) #16
Labels
No labels
bug
ci-cd
duplicate
enhancement
help wanted
layout
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lvl0/rater#16
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
A recent CI run breakdown:
Total ~9 minutes, of which "Set up PHP" is 7m46s — everything else combined is under 1 minute.
Investigation summary (2026-06-10)
Extensive debugging session, findings:
actions/cache@v4never saves on this runner. Confirmed viaACTIONS_STEP_DEBUG=true:ACTIONS_CACHE_URLis correctly injected into job containers (e.g.http://192.168.178.172:41843/<scope>/)curlgets a real HTTP 301 response)/usr/local/phpor~/.composer/cachecache entries, even aftercomposer installpopulated~/.composer/cacheactions/cache@v4(rater,ffr,trove,buckets-budget) — none have ever produced a cache entry on disk (~/.cache/actcache/cache/only contains entries fromdocker/setup-buildx-actionandactions/setup-node's built-in caching, not plainactions/cache@v4)Separately: the
/usr/local/phpcache path was also wrong regardless —setup-php@v2installs PHP to/usr/bin/php, not/usr/local/php, so that cache path would never have anything to save even if caching worked.Runner version:
forgejo-runner v12.6.4(current at time of investigation).Conclusion
This looks like either a runner-level limitation/bug (post-step for
actions/cache@v4not executing in container jobs on this runner version) or a deeper Forgejo Actions cache-server quirk not yet root-caused. Diagnosis was inconclusive after ~2h of investigation; further digging would likely require filing an issue upstream againstforgejo/runnerwith this reproduction.Decision
Deprioritized in favor of #17 (custom CI image with PHP 8.4 + Tailwind binary baked in), which sidesteps this caching mystery entirely and addresses the actual time cost more directly. The dead/non-functional cache steps and
/usr/local/phpcache were removed fromci.ymlas part of that pivot.Revisit if: (a)
actions/cache@v4becomes valuable for a future use case (e.g. Playwright browser binary caching) where #17-style baking-in isn't practical, or (b) a runner upgrade changes this behavior.CI "Set up PHP" step takes 7m46s of a ~9min pipelineto Fix Forgejo Actions cache backend (actions/cache@v4 always misses)