fix: support cache-mode and make low-trust runs cache read-only (#1412)

Low-trust runs like `pull_request_target` on the default branch could poison caches that `push` runs restore. As on GitHub, they now only restore unless `cache-mode` allows saving.

This and the Gitea change can be deployed in any order.

Refs:
https://gitea.com/gitea/actionslib/pulls/33
https://github.com/go-gitea/gitea/pull/40343

_Written by Claude (Opus 5.5)._
Reviewed-on: https://gitea.com/gitea/runner/pulls/1412
Reviewed-by: bircni <[email protected]>
Co-authored-by: silverwind <[email protected]>
This commit is contained in:
silverwind authored and bircni committed 2026-11-13 09:33:32 +00:00
1 parent c2046d597c
commit 4f59e3e418
8 files changed
+127 -26

No files matched your search

+1 -1
View File
@@ -6,7 +6,7 @@ toolchain go1.27.3
require (
connectrpc.com/connect/v2 v2.0.2
gitea.dev/actionslib v1.5.2
gitea.dev/actionslib v1.6.0
github.com/bmatcuk/doublestar/v4 v4.10.4
github.com/coder/websocket v1.8.15
github.com/containerd/errdefs v1.0.0