ci: add mirror-sync workflow + empty fork-ci/ overlay (symmetric to storage#12)#25
Merged
ci: add mirror-sync workflow + empty fork-ci/ overlay (symmetric to storage#12)#25
Conversation
Symmetric to k8sstormcenter/storage#12. Reacts to every push on upstream-pr/** by force-updating test-mirror/<same-topic> with the working tree overlaid from fork-ci/ on main. This lets our internal CI exercise upstream-bound branches without polluting the upstream diff with fork-only workflow files. fork-ci/ is intentionally empty beyond a README today: node-agent's existing build.yaml + component-tests.yaml already behave correctly on any ref. The machinery is in place so that the moment a fork-only workflow tweak is needed (e.g. a push trigger including test-mirror/** or a different image registry), it has a home that will not leak into the upstream PR diff. Requires a CROSS_REPO_PAT secret with contents:write on the fork so the workflow can force-push refs/heads/test-mirror/**. Signed-off-by: Entlein <eineintlein@gmail.com>
entlein
pushed a commit
that referenced
this pull request
May 1, 2026
Pulls in the full PR-kubescape#316 review fix set that just landed on storage main: proper splitPath-based trailing-* anchoring, DefaultCollapseConfigs() defensive-copy accessor, FindConfigForPath value-return, splitEndpoint defensive guard, plus the BenchmarkCompareDynamic baseline.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Node-agent counterpart to k8sstormcenter/storage#12.
Adds
.github/workflows/mirror-sync.yaml+ an empty-but-documentedfork-ci/directory. On every push toupstream-pr/**, the workflow force-updatestest-mirror/<same-topic>withfork-ci/overlaid onto the tree. This lets internal CI exercise upstream-bound branches without ever polluting the upstream PR diff with fork-only workflow files.fork-ci/is intentionally empty here beyond a README: node-agent's currentbuild.yaml+component-tests.yamlalready behave correctly when dispatched on any ref, so today's mirror is byte-identical to the source. The machinery is in place so that the moment a fork-only tweak is needed (test-mirror push trigger, different image registry, etc.), it has a non-leaky home.Why this shape (identical to storage)
upstream-pr/*branches, so nothing else on the fork can accidentally mirror itself.Prerequisite to merge
A repo secret
CROSS_REPO_PATwithcontents:writeon this fork (same secret pattern we use on storage). Without it, the workflow will fail to force-pushrefs/heads/test-mirror/**.Test plan
CROSS_REPO_PATsecret on k8sstormcenter/node-agentupstream-pr/analyzer-perf-harnessbranch (or any trivial amend) and verifytest-mirror/upstream-pr/analyzer-perf-harnessappears andbuild.yamlruns against itupstream-pr/...andtest-mirror/upstream-pr/...is empty today (empty fork-ci/ = no overlay)