Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support single-subject attestations #219

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove attestationSubjects from logSummary
  • Loading branch information
AA-Turner committed Mar 1, 2025
commit 967e74874778a7e5593d6c611e6b9f46b115cdee
33 changes: 14 additions & 19 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -168,27 +168,22 @@ const logAttestation = (

// Attach summary information to the GitHub Actions run
const logSummary = async (attestations: AttestResult[]): Promise<void> => {
if (attestations.length > 0) {
core.summary.addHeading(
/* istanbul ignore next */
attestations.length !== 1
? 'Attestations Created'
: 'Attestation Created',
3
)
const listItems: string[] = []
for (const attestation of attestations) {
if (attestation.attestationID) {
const url = attestationURL(attestation.attestationID)
for (const subject of attestation.attestationSubjects) {
const digest = formatSubjectDigest(subject)
listItems.push(`<a href="${url}">${subject.name}@${digest}</a>`)
}
}
if (attestations.length <= 0) return

core.summary.addHeading(
/* istanbul ignore next */
attestations.length !== 1 ? 'Attestations Created' : 'Attestation Created',
3
)
const listItems: string[] = []
for (const { attestationID } of attestations) {
if (attestationID) {
const url = attestationURL(attestationID)
listItems.push(`<a href="${url}">${url}</a>`)
}
core.summary.addList(listItems)
await core.summary.write()
}
core.summary.addList(listItems)
await core.summary.write()
}

const tempDir = (): string => {