Internal Mirroring Workflow
Overview
Roblox/flipbook is used to deploy the latest FlipbookCore package to the Rotriever registry for consumption by StudioPlugins.
Requirements
- Sync latest changes from
flipbook-labs/flipbook- Do this on a schedule and from workflow_dispatch
- Include rotriever.toml file
- Change workflows to only worry about deployment
- A PR in Roblox/flipbook gets automatically created for the upstream changes
Roblox/flipbook has two primary branches:
roblox: Equivalent of themainbranch. This is where our deviations liveupstream: 1:1 mirror of the upstreammainbranch
Merge conflicts should really be contained to .github/workflows, everything else we can merge the incoming changes.
For .github/workflows we may be able to use git rm to remove all the changes coming in.
Implementation
Two jobs:
sync-upstream-changes
- Triggered on schedule and workflow_dispatch
- Pulls in the latest changes from the
mainbranch offlipbook-labs/flipbook - Creates a PR to merge the changes to the
upstreambranch ofRoblox/flipbook
deploy-upstream-changes
- Triggered on push to the
upstreambranch - Pulls in the changes from
upstreamtoroblox - Discards any changes made to
.github/workflows - Copies
rotriever.tomltoworkspace/flipbook-core - If version in
wally.tomlhas a greater major or minor release thanrotriever.toml, updaterotriever.tomlto match - Else, bump the patch version in
rotriever.tomlto ensure we publish a new version regardless. This intentionally desyncs from upstream - Build the release artifact
- Publish to the Rotriever registry
Versioning decision
It would have been ideal to keep the major/minor/patch version in sync between repos and use some extra metadata to define which version we’re on internally. For example if upstream version is 1.2.3 then the internal version would be 1.2.3-roblox.1 where the last number is incremented each time we pull in new changes.
However due to how version resolution works, 1.2.3 takes precedence over 1.2.3-roblox.1. Consumers would need to pin to the exact internal version to make sure they’re not getting older changes.
To avoid this, we’re intentionally desyncing the patch version between upstream and internal.
References
- Allowing github-actions[bot] to push to protected branch · community · Discussion #25305
- https://github.com/actions/create-github-app-token
Notes
Coming back to the syncing workflow:
- Can't figure out a nice way to automate
upstreamgetting the latest changes - With a fresh mind, I'm curious if there's any room to not conform to EE's
standards. Let upstream sit there, and have PRs auto-generated to merge to
roblox? * This is also tricky because of merge conflicts. Instead, what about keepingupstreammirrored 1:1, thenrobloxis just a job runner, and it will checkout upstream, add rotriever.toml, bump the version, and then publish - This is all getting too complicated and I should start diagramming so I can keep track. And so I can simplify, because I think I'm overengineering