Skip to content

.github: Sync flatcar-hub/gentoo from our job instead of doing it there - #4391

Open
chewi wants to merge 2 commits into
mainfrom
chewi/gha-update-gentoo
Open

chewi wants to merge 2 commits into
mainfrom
chewi/gha-update-gentoo

Conversation

@chewi

@chewi chewi commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Periodically doing this in the remote repo has proven unreliable. Let's do it less frequently, just as needed, from the update job that consumes the repo. This job runs on the CNCF runners too, which will hopefully be more reliable.

Modifying the remote repo requires authentication, which is handled by the new Flatcar Hub Automation app. This app is really nothing more than a private key with the permission to push to flatcar-hub/gentoo. I have added the private key as a flatcar organisation-wide secret, but it is still applied to just the scripts repo. This allows us to potentially use the app with other repos while keeping a single source of truth for the key.

Note that this was entirely written by Copilot.

Testing done

A manual GHA run successfully synced the fork, updated Thilo's test tracking branch, and created the scripts PR in 33 seconds!

We want it ready on the morning of a weekday.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
Periodically doing this in the remote repo has proven unreliable. Let's
do it less frequently, just as needed, from the update job that consumes
the repo. This job runs on the CNCF runners too, which will hopefully be
more reliable.

Modifying the remote repo requires authentication, which is handled by
the new Flatcar Hub Automation app.

Note that this was entirely written by Copilot.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
@chewi chewi self-assigned this Nov 19, 2026
@chewi
chewi requested a review from a team as a code owner November 19, 2026 15:56
Copilot AI balanced review requested due to automatic review settings November 19, 2026 15:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported for the fork-synchronization workflow changes.

No open issues 🎉

What changed in this PR

Moves Gentoo fork synchronization into the scripts workflow that consumes it, replacing reliance on periodic synchronization in the remote repository.

Changes:

  • Adds GitHub App authentication and synchronizes the fork before updating the submodule.
  • Adds tracking-branch rebasing with history deepening, conflict handling, and lease-protected pushes.
  • Changes the schedule to Monday–Friday and passes the synchronized commit to the submodule-update job.
File Description
.github/​workflows/​update-gentoo-submodule.yaml Coordinates authenticated fork synchronization, rebasing, and the submodule update PR.
.github/​workflows/​rebase-gentoo.sh Rebases tracking branches and exports the upstream commit for the submodule update.

Review effort: Balanced

This branch is waiting to be deployed

1 waiting deployment
development — c8a401e0 Waiting Nov 19, 2026 by chewi via Wait for approval #6162
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.

2 participants