Skip to content

Commit f4b9e48

Browse files
committed
build: verify each signature individually
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
1 parent 0527eec commit f4b9e48

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

.github/workflows/build.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -183,16 +183,17 @@ jobs:
183183
const images = [];
184184
for (const tag of tags) {
185185
for (const digest of digests) {
186-
images.push(`${tag}@${digest}`);
186+
await core.group(`Verifying ${tag}@${digest}`, async () => {
187+
await exec.getExecOutput('cosign', ['-d', 'verify', '--certificate-identity-regexp', `^https://github.com/docker/github-builder-experimental/.github/workflows/build.yml.*$`, '--certificate-oidc-issuer', 'https://token.actions.githubusercontent.com', `${tag}@${digest}`], {
188+
ignoreReturnCode: true
189+
}).then(res => {
190+
if (res.stderr.length > 0 && res.exitCode != 0) {
191+
core.warning(`Verification failed for ${tag}@${digest}: ${res.stderr}`);
192+
}
193+
});
194+
});
187195
}
188196
}
189-
await exec.getExecOutput('cosign', ['-d', 'verify', '--certificate-identity-regexp', `^https://github.com/docker/github-builder-experimental/.github/workflows/build.yml.*$`, '--certificate-oidc-issuer', 'https://token.actions.githubusercontent.com', ...images], {
190-
ignoreReturnCode: true
191-
}).then(res => {
192-
if (res.stderr.length > 0 && res.exitCode != 0) {
193-
core.warning(`Verification failed: ${res.stderr}`);
194-
}
195-
});
196197
-
197198
name: Dump context
198199
if: always()

0 commit comments

Comments
 (0)