Github branches

Hi! I was wondering if there is a recommended way to fully utilize Github branches, if it's possible at all? In the past I've tried to create a branch and added extra tags in the recipe with something like :testing, and it built just fine, but rebasing to it wasn't possible, so I assumed it's only usable used to test & monitor builds.
8 Replies
Nobody Watchin
Good question, I was wondering how to do this as well
amel
amelOP3w ago
FYI, the error is like this:
> rpm-ostree rebase ostree-image-signed:docker://ghcr.io/owner/repo:branch
Pulling manifest: ostree-image-signed:docker://ghcr.io/owner/repo:branch
error: Creating importer: failed to invoke method OpenImage: failed to invoke method OpenImage: reading manifest branch in ghcr.io/owner/repo: manifest unknown
> rpm-ostree rebase ostree-image-signed:docker://ghcr.io/owner/repo:branch
Pulling manifest: ostree-image-signed:docker://ghcr.io/owner/repo:branch
error: Creating importer: failed to invoke method OpenImage: failed to invoke method OpenImage: reading manifest branch in ghcr.io/owner/repo: manifest unknown
The image builds successfully within the branch, assigned alt-tags (f.ex testing, rawhide) so they don't use latest, and share the same cosign keys as the main branch (which works and can be rebased to)
xyny
xyny3w ago
Hard to say why that wouldn't work, it's certainly supposed to. But FYI, BlueBuild adds branch-based tags without you having to set alt-tags.
amel
amelOP3w ago
Thanks for the info! I think last time I tried, not setting alt-tags it overrode latest, and since then I made sure to set alt-tags myself. Not sure if I'm misremembering though. I'll give it a try without alt-tags and see if it changes anything. Thank you! And to be extra sure, my general procedure is (theoretically) already correct and I don't need to set up further things, like new cosign keys for the branches etc, right?
xyny
xyny3w ago
That may have been a bug that was fixed, @Luke Skywunker would know better about this Yes
amel
amelOP3w ago
Okay, so I think I've figured it out: ghcr.io/owner/repo:branch won't work but ghcr.io/owner/repo:br-branch works, following the build finished messages. For comparison, here is my main/latest build msg:
[07:24:27 INFO] => Finished building:
- ghcr.io/askpng/solarpowered:latest
- ghcr.io/askpng/solarpowered:20250313
- ghcr.io/askpng/solarpowered:41
- ghcr.io/askpng/solarpowered:20250313-41
- ghcr.io/askpng/solarpowered:ff09b85-41
[07:24:27 INFO] => Finished building:
- ghcr.io/askpng/solarpowered:latest
- ghcr.io/askpng/solarpowered:20250313
- ghcr.io/askpng/solarpowered:41
- ghcr.io/askpng/solarpowered:20250313-41
- ghcr.io/askpng/solarpowered:ff09b85-41
Here is my 42 branch build msg, without alt-tags specified:
[13:18:27 INFO] => Finished building:
- ghcr.io/askpng/solarpowered:br-42-42
- ghcr.io/askpng/solarpowered:8e3f652-42
[13:18:27 INFO] => Finished building:
- ghcr.io/askpng/solarpowered:br-42-42
- ghcr.io/askpng/solarpowered:8e3f652-42
42 branch, with alt-tags: '42':
[17:49:10 INFO] => Finished building:
- ghcr.io/askpng/solarpowered:br-42-42-42
- ghcr.io/askpng/solarpowered:fd9081a-42-42
[17:49:10 INFO] => Finished building:
- ghcr.io/askpng/solarpowered:br-42-42-42
- ghcr.io/askpng/solarpowered:fd9081a-42-42
rawhide branch, with alt-tags: 'rawhide':
[15:25:59 INFO] => Finished building:
- ghcr.io/askpng/solarpowered:br-rawhide-rawhide-43
- ghcr.io/askpng/solarpowered:3fa9482-rawhide-43
[15:25:59 INFO] => Finished building:
- ghcr.io/askpng/solarpowered:br-rawhide-rawhide-43
- ghcr.io/askpng/solarpowered:3fa9482-rawhide-43
I wrongly assumed that the produced image will be tagged :branch... turns out it's pushed as br-branch. I do use rechunk on Github though so I wonder if this is a factor, since building locally produces the following msg:
[21:39:04 INFO] => Finished building:
- localhost/solarpowered:rawhide
- localhost/solarpowered:rawhide-43
- localhost/solarpowered:20250311-rawhide-43
- localhost/solarpowered:7f4addf-rawhide-43
[21:39:04 INFO] => Finished building:
- localhost/solarpowered:rawhide
- localhost/solarpowered:rawhide-43
- localhost/solarpowered:20250311-rawhide-43
- localhost/solarpowered:7f4addf-rawhide-43
Luke Skywunker
Yeah that's the expected setup for branch tags. Sorry for the late response, been driving across the country helping family move
amel
amelOP3w ago
Appreciate the confirmation! Good luck w/ the move

Did you find this page helpful?