Skip to content

feat(actions): support cache-mode - #40343

Draft
silverwind wants to merge 2 commits into
go-gitea:mainfrom
silverwind:cache-mode
Draft

silverwind wants to merge 2 commits into
go-gitea:mainfrom
silverwind:cache-mode

Conversation

@silverwind

@silverwind silverwind commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Forward GitHub's cache-mode key in job payloads so runners can honor it, and cap the cache access of reusable workflow jobs at their caller's explicit cache-mode as GitHub does, failing the expansion when a called job asks for more. The runner makes low-trust triggers such as pull_request_target and issue_comment on the default branch read-only by default, and cache-mode is how a workflow overrides that.

The actionslib change must be merged and released first, this pins its commit until then.

actionslib: https://gitea.com/gitea/actionslib/pulls/33
runner: https://gitea.com/gitea/runner/pulls/1412

Assisted-by: Claude Code:claude-opus-5-5

…kflows

GitHub's `cache-mode` key narrows a workflow's or job's cache access, or
opts a low-trust trigger back into saving caches. The job payload dropped
it, so runners could never honor it. A job calling a reusable workflow
now also caps the cache access of the called jobs, as on GitHub, and a
called job asking for more fails the expansion.

Assisted-by: Claude Code:claude-opus-5-5
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Nov 12, 2026
@github-actions github-actions Bot added topic/gitea-actions related to the actions of Gitea type/feature Completely new functionality. Can only be merged if feature freeze is not active. labels Nov 12, 2026
@silverwind
silverwind marked this pull request as draft November 12, 2026 13:21
Assisted-by: Claude Code:claude-opus-5-5
@silverwind silverwind changed the title feat(actions): pass cache-mode to runners and cap it for called workflows feat(actions): support cache-mode Nov 12, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. topic/gitea-actions related to the actions of Gitea type/feature Completely new functionality. Can only be merged if feature freeze is not active.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants