Skip to content

fix(ci): push production tags after signing#2231

Open
renner0e wants to merge 8 commits into
ublue-os:mainfrom
renner0e:temporary-push
Open

fix(ci): push production tags after signing#2231
renner0e wants to merge 8 commits into
ublue-os:mainfrom
renner0e:temporary-push

Conversation

@renner0e
Copy link
Copy Markdown
Member

If the signing step fails, causes for this can be ghcr jank or a sigstore outage and not testing our changes properly beforehand. Then we have already pushed images to the registry with production tags that users can update to.

The clients won't actually update to these images as we enforce verification on the client side to pull images from ghcr.io/ublue-os/ only with a valid signature attached. Otherwise this leads to an "update failed" on the users POV, which is very confusing. This has been a longstanding issue across the org 1 2 3.

To workaround this, we push a tag to the registry first that we don't care about and clients don't check against for updates. I chose the job id because it always changes.

This also happens to get rid of the action we use for retries to workaround ghcr jank, we were forced to do this in the past because the old podman version we used at the time didn't have those features.

Using podman to push signatures and images at the same time is not something that is viable at the moment unfortunately but is definitely the approach we should be using once it works well.

This effort can be seen at 4. Although we are likely hitting 5 here where all layers get invalidated because of this bug. We are effectively pushing full images/no shared layers every time we do podman push. Which causes the overall push step in CI to take upwards of 20 minutes.

fixes: #2135

@codacy-production
Copy link
Copy Markdown

codacy-production Bot commented May 17, 2026

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@renner0e renner0e requested a review from m2Giles May 17, 2026 19:21
Comment thread .github/workflows/reusable-build.yml Outdated
If the signing step fails, causes for this can be ghcr jank or a
sigstore outage and not testing our changes properly beforehand. Then we
have already pushed images to the registry with production tags that
users can update to.

The clients won't actually update to these images as we enforce
verification on the client side to pull images from ghcr.io/ublue-os/
only with a valid signature attached. Otherwise this leads to an "update
failed" on the users POV, which is very confusing. This has been a
longstanding issue across the org [1] [2] [3].

To workaround this, we push a tag to the registry first that we don't
care about and clients don't check against for updates. I chose the job
id because it always changes.

This also happens to get rid of the action we use for retries to
workaround ghcr jank, we were forced to do this in the past because the
old podman version we used at the time didn't have those features.

Using podman to push signatures and images at the same time is not
something that is viable at the moment unfortunately but is definitely
the approach we should be using once it works well.

This effort can be seen at [4]. Although we are likely hitting [5] here
where all layers get invalidated because of this bug. We are effectively
pushing full images/no shared layers every time we do podman push. Which
causes the overall push step in CI to take upwards of 20 minutes.

fixes: ublue-os#2135

[1]: ublue-os/bazzite#4902
[2]: ublue-os/main#643
[3]: ublue-os/bazzite#3044
[4]: containers/podman#27796
[5]: ublue-os#2199

Signed-off-by: renner <renner0@posteo.de>
renner0e added 2 commits May 17, 2026 21:39
It seems like cosign tries to verify all .sig files on the registry for
that digest, one of which is generated by cosign sign with a static key
and one is generated by actions/attest using an OIDC.

This exactly broke, which is what we have been using for the longest
time:

```
cosign verify --key cosign.pub ghcr.io/ublue-os/aurora:latest

Error: no matching attestations: expected key signature, not certificate
error during command execution: no matching attestations: expected key
signature, not certificate
```

And this currently works to verify the image, although it is of course
not the same thing as singing with the ublue cosign key.

This will not work going forward after this commit:

```
cosign verify \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com \
  --certificate-identity-regexp="github.com/ublue-os/aurora/.github/workflows/*" \
  ghcr.io/ublue-os/aurora:latest
```

Signed-off-by: renner <renner0@posteo.de>
This is just a minor cosmetic thing and recudes the amount of tags we
have because it's static and not changing unlike the run id.

Signed-off-by: renner <renner0@posteo.de>
Signed-off-by: renner <renner0@posteo.de>
inffy
inffy previously approved these changes May 17, 2026
@inffy inffy added this pull request to the merge queue May 17, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 17, 2026
@renner0e
Copy link
Copy Markdown
Member Author

yeah this was implemented to need
#2208

Or else we are getting this error with new cosign 3.X.X

```
Error: must provide --new-bundle-format or --bundle where applicable
with --signing-config or --use-signing-config error during command
```

Signed-off-by: renner <renner0@posteo.de>
renner0e added 3 commits May 19, 2026 21:25
if this fails at the beginning because of jank then it's not so bad
```
Error: error getting signing config from TUF: error setting TUF options:
error setting TUF mirror: error reading remote.json: open
/home/runner/.sigstore/root/remote.json: permission denied
```
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.

Update Error Started Today in Aurora

3 participants