From 55b69cc530534ba709fe657a3bd65e3cdab13ef5 Mon Sep 17 00:00:00 2001 From: Javier Rodriguez Date: Tue, 2 Jun 2026 17:34:59 +0200 Subject: [PATCH] feat(dagger): expose --mark-latest flag on attestation init Forwards the new CLI flag added in #3151 through the Dagger module so callers can explicitly mark (or skip marking) a project version as latest when initializing an attestation. Signed-off-by: Javier Rodriguez --- extras/dagger/main.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/extras/dagger/main.go b/extras/dagger/main.go index 639ada919..795dd1e94 100644 --- a/extras/dagger/main.go +++ b/extras/dagger/main.go @@ -156,6 +156,10 @@ func (m *Chainloop) Init( // mark the version as release // +optional release bool, + // Explicitly mark the project version as latest (use =false to skip promotion). + // When unset, the server decides automatically (defaults to latest for new versions). + // +optional + markLatest *bool, // Github event file for PR detection (when running in Github Actions) // +optional githubEventFile *dagger.File, @@ -283,6 +287,10 @@ func (m *Chainloop) Init( ) } + if markLatest != nil { + args = append(args, fmt.Sprintf("--mark-latest=%t", *markLatest)) + } + info, err := att. Container(0). WithExec(args, execOpts).