forked from actions/attest-build-provenance
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for attesting multiple docker images
Fixes actions#454 Add support for passing a list of docker images to attest. * **action.yml** - Add a new input parameter `subject-images` to accept a list of docker images. - Update the `runs` section to handle the `subject-images` input. * **src/main.ts** - Import `parseMultiImageInput` function from `utils.ts`. - Add logic to handle the `subject-images` input and process multiple docker images for attestation. * **README.md** - Update the documentation to include usage instructions for the `subject-images` input. - Add an example for attesting multiple docker images. * **__tests__/main.test.ts** - Add test cases to verify the functionality of attesting multiple docker images using the `subject-images` input. * **src/utils.ts** - Add a new file to include the `parseMultiImageInput` function to parse the `subject-images` input. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/actions/attest-build-provenance/issues/454?shareId=XXXX-XXXX-XXXX-XXXX).
- Loading branch information
1 parent
ccf3390
commit 284c3fc
Showing
5 changed files
with
118 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/** | ||
* Utility functions for the action. | ||
*/ | ||
|
||
/** | ||
* Parses the multi-image input string and returns an array of image strings. | ||
* @param {string} input - The multi-image input string. | ||
* @returns {string[]} An array of image strings. | ||
*/ | ||
export function parseMultiImageInput(input: string): string[] { | ||
return input.split('\n').map(image => image.trim()).filter(image => image.length > 0) | ||
} |