-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat!: only deploy the branch named "live", to simplify development #76
Conversation
be51f25
to
93fca5d
Compare
@EinoHR One moment, I'll change the branch name to Edit: Alright, this is ready for review. |
Also note that renaming a branch automatically redirects web URLs to the new name. So the old |
So does this mean that we should do it right after this PR is merged? Your wording about main/template is kind of vague. I guess it wouldn't matter either way. Re: only build the customized branch I'm having trouble seeing what the benefit of including the template's code in your own branch is, when you can already rebase on top of remote branches locally by having multiple remotes (ie. how On a tangent... The official docs IIRC currently recommend forking the repo to get that GUI dialog to sync your fork, but that's not how I do it because you can only have one fork per repo, and honestly syncing via CLI is just as easy but more powerful (when you've got the commands written down...). Edit:
So all branches get still built by the new workflow (even though only the custom one is mentioned in the |
The rename would be a good idea after merge, to get it over with before even more people use this template repo.
By including the template in your own branch, we make it more accessible to everyone since GitHub has a super easy GUI for syncing the
Yes every branch and pull request gets built when they change. The result is simply never pushed to GHCR unless it's the We'll still be able to work on This means that we retain the ability to develop in other branches and ensure things build, without destroying GHCR's public registry. :) |
Alright, thanks for keeping me informed. Since this makes things a bit more clear (and easier for less-wizardy git users), but doesn't seem to hurt anything, I guess it's good to go. Maybe change the branch name then and we good? |
@EinoHR Regarding the benefit of having that "Sync fork" button: That was added to GitHub precisely because people had so much trouble keeping their forks in sync. There used to be literal WEBSITES made by people on Here's the button we get by having the proposed branch layout: ❤️ |
Is this on customrepo:template or customrepo:live? Does one need to both sync their template and manually rebase on top of it / do a merge or is that handled automatically? |
It's on After that they can do whatever workflow they prefer. I'd always recommend people do an interactive rebase of their |
Head branch was pushed to by a user without write access
- Documents all triggers, since this repository is a starting point for people to learn from. - Only deploys the branch named "live", which gives people more deliberate control of what gets deployed. Why not name it "main"? Because that complicates things a lot when forking this template to your own repos, since the template's default branch is also (currently) named "main", which would among other things complicate the act of syncing the fork via GitHub's web UI. The name "main" also confuses the user since it doesn't give them any hint that it's the only live-published branch. - Only automatically builds the branches "live", "template" or "main" when pushing new commits. But builds any branch name when it's a pull request, to allow automated PR "build checks" to succeed.
@EinoHR Oh yeah just in case you missed the link, here's the docs about renaming Edit for anyone who might read this thread in the future:We found out that workflows in pull requests use the workflow of the primary branch of the forked repo, not the upstream, which is why Eino saw that the actions weren't running. We have fixed all issues with pull request builds in the final version of these commits. The new GitHub action workflow now runs for every pull request. More details are in the code comments of the commits. |
Rewires the GitHub workflow a bit, to make it much easier to create custom images based on
startingpoint
. With these changes, the following technique becomes possible for our downstream users:ublue-os/startingpoint
repo.template
branch to upstream for easy syncing (just a simple "set upstream" git command locally). In fact, they can do that syncing effortlessly via the GitHub web UI with one click since that's doable by default (there's a "Sync fork" button whenever users view the "primary upstream" branch on their forks).live
branch and perform their own edits there.template
and then rebase their ownlive
ontotemplate
to get the latest template improvements.template
branch would constantly deploy itself and overwrite your real GHCR contents. And in general, there would be a mess whenever you have multiple development/test branches, which would all be built and deployed to GHCR and collide with each other. This fixes all of that.Before v1.0, we should also rename the
main
branch in this repo totemplate
instead (what I used in the list above), and marktemplate
as the primary branch.That way, all downstream repos will only have two clear and easy branches to deal with:
template
= That's the untouched upstream, which they periodically sync to get the latest improvements.live
= That's their actual deployment branch, which they periodically rebase onto template to get the freshest changes.Simple. Easy. Enjoyable. :)