Skip to content

Commit 8331435

Browse files
authored
feat(dagger): expose --mark-latest flag on attestation init (#3165)
Signed-off-by: Javier Rodriguez <javier@chainloop.dev>
1 parent 9bcb019 commit 8331435

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

extras/dagger/main.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,10 @@ func (m *Chainloop) Init(
156156
// mark the version as release
157157
// +optional
158158
release bool,
159+
// Explicitly mark the project version as latest (use =false to skip promotion).
160+
// When unset, the server decides automatically (defaults to latest for new versions).
161+
// +optional
162+
markLatest *bool,
159163
// Github event file for PR detection (when running in Github Actions)
160164
// +optional
161165
githubEventFile *dagger.File,
@@ -283,6 +287,10 @@ func (m *Chainloop) Init(
283287
)
284288
}
285289

290+
if markLatest != nil {
291+
args = append(args, fmt.Sprintf("--mark-latest=%t", *markLatest))
292+
}
293+
286294
info, err := att.
287295
Container(0).
288296
WithExec(args, execOpts).

0 commit comments

Comments
 (0)