Skip to content

Commit 7980629

Browse files
Copilotmudler
andauthored
Fix backend manifest merge signing on current cosign releases (#9957)
* Initial plan * fix: remove deprecated cosign bundle flag from backend merge workflow Agent-Logs-Url: https://github.com/mudler/LocalAI/sessions/4207dabc-14ec-4655-9594-487338977fcf Co-authored-by: mudler <2420543+mudler@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: mudler <2420543+mudler@users.noreply.github.com>
1 parent d0a59be commit 7980629

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

.agents/backend-signing.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ side (`pkg/oci/cosignverify` plus the gallery YAML).
1616
per-arch manifest before checking signatures.
1717
- **Storage:** Signatures are written as OCI 1.1 referrers
1818
(`--registry-referrers-mode=oci-1-1`) in the new Sigstore bundle format
19-
(`--new-bundle-format`). No `:sha256-<hex>.sig` tag clutter.
19+
(current cosign releases do this by default; no `--new-bundle-format`
20+
flag). No `:sha256-<hex>.sig` tag clutter.
2021
- **Consumer:** `pkg/oci/cosignverify` discovers the bundle via the
2122
referrers API, hands it to `sigstore-go`, and verifies it against the
2223
policy declared in the gallery YAML (`Gallery.Verification`).
@@ -33,15 +34,14 @@ to sign. The job needs:
3334

3435
- `permissions: { id-token: write, contents: read }` at the job level so
3536
the runner can exchange its GitHub OIDC token for a Fulcio cert.
36-
- `sigstore/cosign-installer@v3` step (cosign ≥ 2.2 for
37-
`--new-bundle-format`).
37+
- `sigstore/cosign-installer@v3` step (current cosign releases already
38+
default to the new bundle format).
3839
- After each `docker buildx imagetools create`, resolve the resulting
3940
list digest with `docker buildx imagetools inspect <tag> --format
4041
'{{.Manifest.Digest}}'` and sign:
4142

4243
```sh
4344
cosign sign --yes --recursive \
44-
--new-bundle-format \
4545
--registry-referrers-mode=oci-1-1 \
4646
"${REGISTRY_REPO}@${DIGEST}"
4747
```

.github/workflows/backend_merge.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ jobs:
6666

6767
# cosign signs each pushed manifest list with --recursive so the
6868
# index and every per-arch entry get an attached Sigstore bundle.
69-
# 2.2+ is required for --new-bundle-format.
69+
# Recent cosign releases always emit the new bundle format, so
70+
# there's no extra CLI flag to opt into it.
7071
- name: Install cosign
7172
if: github.event_name != 'pull_request'
7273
uses: sigstore/cosign-installer@v3
@@ -153,7 +154,6 @@ jobs:
153154
# manifest before checking signatures need the per-arch
154155
# signatures, not just the list-level one.
155156
cosign sign --yes --recursive \
156-
--new-bundle-format \
157157
--registry-referrers-mode=oci-1-1 \
158158
"quay.io/go-skynet/local-ai-backends@${digest}"
159159
@@ -180,7 +180,6 @@ jobs:
180180
' <<< "$DOCKER_METADATA_OUTPUT_JSON")
181181
digest=$(docker buildx imagetools inspect "$first_tag" --format '{{.Manifest.Digest}}')
182182
cosign sign --yes --recursive \
183-
--new-bundle-format \
184183
--registry-referrers-mode=oci-1-1 \
185184
"localai/localai-backends@${digest}"
186185

0 commit comments

Comments
 (0)