Skip to content

Add path to created attestation in a well-known summary file #252

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

Merged
merged 6 commits into from
Jun 11, 2025

Conversation

kommendorkapten
Copy link
Contributor

For a situation where multiple attestations are created in a workflow, write the path to each file in a well-known file. This allows for creation of summary steps that can easily read this and act on the created attestations, without knowing about all the steps and their id:s.

The file chosen to be the well-known file is ${RUNNER_TEMP}/created_attestation_paths.txt. Each attestation is appended to that file, one path to an attestation per line.

attestation is stored. One attestation per line.

Signed-off-by: Fredrik Skogman <kommendorkapten@github.com>
Signed-off-by: Fredrik Skogman <kommendorkapten@github.com>
@Copilot Copilot AI review requested due to automatic review settings June 10, 2025 16:22
@kommendorkapten kommendorkapten requested a review from a team as a code owner June 10, 2025 16:22
@kommendorkapten kommendorkapten requested a review from bdehamer June 10, 2025 16:22
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds tracking of all created attestations by appending their paths to a summary file and documents this behavior in the README.

  • Introduce created_attestation_paths.txt constant and append each attestation path to this file in main.ts
  • Update README to explain how to locate all attestation files via ${RUNNER_TEMP}/created_attestation_paths.txt

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/main.ts Append each generated attestation file path to a summary file in runner temp
README.md Document the new summary file and its usage
Comments suppressed due to low confidence (1)

src/main.ts:86

  • [nitpick] Consider adding a unit test that verifies this summary file is created and that appendFileSync is called with the correct path and data.
fs.appendFileSync(outputSummaryPath, outputPath + os.EOL, {

@kommendorkapten kommendorkapten merged commit 6a89e12 into main Jun 11, 2025
20 checks passed
@kommendorkapten kommendorkapten deleted the kommendorkapten/attestations-summary-file branch June 11, 2025 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants