Skip to content

ci: let a private copy of this repository build safely - #595

Closed
chrip wants to merge 10 commits into
mainfrom
ci/private-copy-builds
Closed

chrip wants to merge 10 commits into
mainfrom
ci/private-copy-builds

Conversation

@chrip

@chrip chrip commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Depends on #534. This branch has #534 merged in, so until #534 lands the diff here shows both. On top of #534 it changes 6 workflow files (+41/-5).

Security fixes are built in a private copy of a repository before their release day (see the security process page in the wiki). #534 lets such a copy run CI on the organisation's runners without publishing anything. This adds what a copy still needs to build a fix:

  • Private submodules: the repository variable PRIVATE_SUBMODULES (e.g. core sdkjs) makes build.yml fetch those submodules from Euro-Office/<name>-private, both for the checkout and for the branch inputs of a manual run. A fix in core-private is pinned by a commit that does not exist in Euro-Office/core, so without this the copy cannot check out its own submodules. This needs the mirror token as a secret in the copy.
  • Submodule pin check: gitlink-guard.yml is skipped in a private copy. Its lookups cannot see commits that exist only in the private copies of the submodules.
  • Push syncs: a private copy builds and runs the entrypoint tests for pull requests and manual runs only. A push to its main is just a sync of the public main, and testing it would tie up the organisation's runners for nothing.
  • Submodule bump: update-submodules.yml tests for a private repository, not for this repository's name. DesktopEditors and MobileEditors call it, and in a called workflow github.repository is the caller, so a name check would skip their nightly bumps.
  • Workflows that reached main after ci: run on self-hosted runners in private repos #534 was rebased: submodule-bump-merge.yml only runs in this repository (it approves and auto-merges with the robot token), and orchestrated-entrypoint.yml uses the organisation's runners in a private copy.

In this repository the variable is unset and github.event.repository.private is false, so nothing changes here. Same variable name as Euro-Office/DesktopEditors#299.

Testing

Assisted-by: ClaudeCode:claude-opus-5-5

🤖 Generated with Claude Code

juliusknorr and others added 5 commits November 18, 2026 23:25
Jobs pick self-hosted runners only when the repository is private, so copies of the repo keep work off GitHub-hosted runners. Copies keep their build cache and e2e images in their own documentserver-build-cache-<repository_id> package and never publish images, releases or packages.

Signed-off-by: Julius Knorr <jus@bitgrid.net>
No-test: CI workflow config
Assisted-by: ClaudeCode:claude-opus-5-5
A private copy now builds like a fork pull request: no registry cache
export, no image push, no e2e or upgrade job. The dev image, release
and image cleanup workflows skip there, and the submodule bump runs in
this repository only.

Assisted-by: ClaudeCode:claude-fable-5-2
Signed-off-by: Christoph Schaefer <christoph.schaefer@nextcloud.com>
The repository variable PRIVATE_SUBMODULES names the submodules that a
private copy takes from Euro-Office/<name>-private, for the checkout
and for the branch inputs of a manual run. It is unset here.

Assisted-by: ClaudeCode:claude-fable-5-2
Signed-off-by: Christoph Schaefer <christoph.schaefer@nextcloud.com>
A private repository has no free hosted minutes, so its jobs go to the
self-hosted pool. Public repositories keep the hosted runners.

Assisted-by: ClaudeCode:claude-fable-5-2
Signed-off-by: Christoph Schaefer <christoph.schaefer@nextcloud.com>
Other repositories call update-submodules.yml, so its job now tests
whether the repository is private, not its name. A private copy builds
pull requests and manual runs only, skips the submodule pin check,
whose lookups cannot see private commits, and runs the wait-for-core
jobs on the organisation's runners like the other Linux jobs.

Assisted-by: ClaudeCode:claude-fable-5-2
Signed-off-by: Christoph Schaefer <christoph.schaefer@nextcloud.com>
chrip and others added 5 commits November 30, 2026 20:01
…ilds

Takes #534 as the base and keeps only what it does not cover: the private
submodules, the skipped submodule pin check, the guard on the weekly bump
merge, and no runs on push syncs of a private copy.

Assisted-by: ClaudeCode:claude-opus-5-5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Christoph Schaefer <christoph.schaefer@nextcloud.com>
Assisted-by: ClaudeCode:claude-opus-5-5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Christoph Schaefer <christoph.schaefer@nextcloud.com>
…te copy

orchestrated-entrypoint.yml reached main after #534 was rebased, so it still
asked for a hosted runner, which a private repository does not get.

Assisted-by: ClaudeCode:claude-opus-5-5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Christoph Schaefer <christoph.schaefer@nextcloud.com>
DesktopEditors and MobileEditors call update-submodules.yml, and in a called
workflow github.repository is the caller, so the name check that came in
with the merge of #534 skipped their nightly bumps. Test for a private
repository instead, as 1dab53d did.

Assisted-by: ClaudeCode:claude-opus-5-5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Christoph Schaefer <christoph.schaefer@nextcloud.com>
A push to main in a private copy only syncs the public main, and ci.yml
already skips its build. Skip the entrypoint tests there too, so the sync
doesn't hold a self-hosted runner.

Assisted-by: ClaudeCode:claude-opus-5-5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Christoph Schaefer <christoph.schaefer@nextcloud.com>
@chrip
chrip marked this pull request as ready for review November 30, 2026 19:16
@chrip
chrip requested a review from a team as a code owner November 30, 2026 19:16
@chrip
chrip requested review from rikled and removed request for a team November 30, 2026 19:16
@rikled

rikled commented Dec 1, 2026

Copy link
Copy Markdown
Member

Publish guards look right. A few things:

  • Conflicts with main now; the new release-info job (ci(release): move latest only for the highest stable tag #576) needs the private-copy runs-on / repo guard too.
  • update-submodules.yml:17: !github.event.repository.private — I believe the schedule payload has no repository, so this would fall back to ubuntu-latest in a private copy and run the nightly bump there (not verified). !endsWith(github.repository, '-private') or a repo variable avoids relying on the payload.
  • Combined with ci: run on self-hosted runners in private repos #534 this does change the public repo (e2e/upgrade/update-submodules/strip-logo move to ubuntu-latest) — please mention it; the comment at ci.yml:43 is now misleading.
  • Minor: tag pushes into a private copy still run full release builds, and the copy never builds main, so every private PR builds core cold. Fall back to the public cache for cache-from?

@juliusknorr juliusknorr closed this Dec 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants