@@ -577,18 +577,21 @@ jobs:
577577 });
578578
579579 const verifyResults = await sigstore.verifySignedManifests(
580- { certificateIdentityRegexp: `^https://github.com/docker/github-builder-experimental/.github/workflows/bake.yml.*$` },
580+ { certificateIdentityRegexp: `^https://github\ .com/docker/github-builder-experimental/\ .github/workflows/bake\ .yml@ .*$` },
581581 signResults
582582 );
583583
584584 await core.group(`Verify commands`, async () => {
585585 const verifyCommands = [];
586586 for (const [attestationRef, verifyResult] of Object.entries(verifyResults)) {
587- const cmd = `cosign ${verifyResult.cosignArgs.join(' ')} ${attestationRef}`;
588- core.info(cmd);
587+ const cmd = {
588+ executable: 'cosign',
589+ args: [...verifyResult.cosignArgs, attestationRef]
590+ };
591+ core.info(`${cmd.executable} ${cmd.args.join(' ')}`);
589592 verifyCommands.push(cmd);
590593 }
591- core.setOutput('verify-commands', verifyCommands.join('\n' ));
594+ core.setOutput('verify-commands', JSON.stringify(verifyCommands ));
592595 });
593596 -
594597 name : Signing local artifacts
@@ -609,18 +612,21 @@ jobs:
609612 });
610613
611614 const verifyResults = await sigstore.verifySignedArtifacts(
612- { certificateIdentityRegexp: `^https://github.com/docker/github-builder-experimental/.github/workflows/bake.yml.*$` },
615+ { certificateIdentityRegexp: `^https://github\ .com/docker/github-builder-experimental/\ .github/workflows/bake\ .yml@ .*$` },
613616 signResults
614617 );
615618
616619 await core.group(`Verify commands`, async () => {
617620 const verifyCommands = [];
618621 for (const [artifactPath, verifyResult] of Object.entries(verifyResults)) {
619- const cmd = `cosign ${verifyResult.cosignArgs.join(' ')} --bundle ${path.relative(inplocalExportDir, verifyResult.bundlePath)} ${path.relative(inplocalExportDir, artifactPath)}`;
620- core.info(cmd);
622+ const cmd = {
623+ executable: 'cosign',
624+ args: [...verifyResult.cosignArgs, '--bundle', path.relative(inplocalExportDir, verifyResult.bundlePath), path.relative(inplocalExportDir, artifactPath)]
625+ };
626+ core.info(`cosign ${verifyResult.cosignArgs.join(' ')} --bundle ${path.relative(inplocalExportDir, verifyResult.bundlePath)} ${path.relative(inplocalExportDir, artifactPath)}`);
621627 verifyCommands.push(cmd);
622628 }
623- core.setOutput('verify-commands', verifyCommands.join('\n' ));
629+ core.setOutput('verify-commands', JSON.stringify(verifyCommands ));
624630 });
625631 -
626632 name : List local output
@@ -759,7 +765,8 @@ jobs:
759765 for (const key of Object.keys(inpBuildOutputs)) {
760766 const output = JSON.parse(inpBuildOutputs[key]);
761767 if (output.verifyCommands) {
762- verifyCommands.push(output.verifyCommands);
768+ const commands = JSON.parse(output.verifyCommands);
769+ verifyCommands.push(...commands);
763770 }
764771 }
765- core.setOutput('cosign-verify-commands', verifyCommands.join('\n' ));
772+ core.setOutput('cosign-verify-commands', JSON.stringify(verifyCommands ));
0 commit comments