https://blue-build.org/ logo
Github branches
# questions
m
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.
a
message has been deleted
n
Good question, I was wondering how to do this as well
m
FYI, the error is like this:
Copy code
> 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)
x
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
.
m
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?
x
That may have been a bug that was fixed, @gmpinder would know better about this
Yes
m
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:
Copy code
[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:
Copy code
[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'`:
Copy code
[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'`:
Copy code
[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:
Copy code
[21:39:04  INFO] => Finished building:
        - localhost/solarpowered:rawhide
        - localhost/solarpowered:rawhide-43
        - localhost/solarpowered:20250311-rawhide-43
        - localhost/solarpowered:7f4addf-rawhide-43
g
Yeah that's the expected setup for branch tags. Sorry for the late response, been driving across the country helping family move
m
Appreciate the confirmation! Good luck w/ the move
2 Views