Repository navigation
signing setup: write the builder.json profile only when its secrets were uploaded - #39
Merged
Merged
Conversation
…ere uploaded A profile in builder.json says the signing set is ready to build with. When the upload failed (a token that cannot write repository secrets, such as an agent platform's), writing it anyway made builds fail late on missing secrets and misled anyone reading builder.json, agents that cannot list secrets included. Both setup modes now skip the profile and say so; the library reports it in SetupResult.ProfileWritten.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A profile in
builder.jsonsays the signing set is ready to build with. When the secret upload failed (for example an agent platform's GitHub token, which cannot write repository secrets),signing setupwrote the profile anyway. Builds then failed late on missing secrets, and anyone readingbuilder.json(an agent that cannot list secrets included) was told signing was ready.signing.Setupwrites the profile only whenSecretsUploaded; the newSetupResult.ProfileWrittenreports it.Not updated: builder.jsoninstead of the profile line on a failed upload. Everything else (files, printed values, exit code) is unchanged.go test ./cmd/builder/ ./internal/signing/passes.