Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions gradle/develocity.settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,13 @@ buildCache {
}
remote(develocityBuildCache) {
enabled = true
// Only authenticated CI writes, so unmerged and fork code cannot poison the cache.
push = isCI && accessKey != null && !accessKey.isEmpty()
// Write only from trusted events. Local dev is excluded by isCI, and
// pull_request runs are excluded here: a same-repository PR DOES receive
// repository secrets, so gating on the access key alone would let
// unmerged code write entries into the shared cache. Fork PRs have no
// key and are excluded twice over.
def eventName = System.getenv("GITHUB_EVENT_NAME")
def trustedForPush = eventName == "push" || eventName == "merge_group"
push = isCI && trustedForPush && accessKey != null && !accessKey.isEmpty()
}
}