add show-summary input (#108)

Signed-off-by: Brian DeHamer <bdehamer@github.com>
This commit is contained in:
Brian DeHamer
2024-07-30 11:27:18 -07:00
committed by GitHub
parent af3e2e79a8
commit 97f7cf8914
8 changed files with 23 additions and 5 deletions
+4
View File
@@ -96,6 +96,10 @@ See [action.yml](action.yml)
# the "subject-digest" parameter be specified. Defaults to false.
push-to-registry:
# Whether to attach a list of generated attestations to the workflow run
# summary page. Defaults to true.
show-summary:
# The GitHub token used to make authenticated API requests. Default is
# ${{ github.token }}
github-token:
+1
View File
@@ -44,6 +44,7 @@ const defaultInputs: main.RunInputs = {
subjectDigest: '',
subjectPath: '',
pushToRegistry: false,
showSummary: true,
githubToken: '',
privateSigning: false,
batchSize: 50
+6
View File
@@ -47,6 +47,12 @@ inputs:
the "subject-digest" parameter be specified. Defaults to false.
default: false
required: false
show-summary:
description: >
Whether to attach a list of generated attestations to the workflow run
summary page. Defaults to true.
default: true
required: false
github-token:
description: >
The GitHub token used to make authenticated API requests.
Generated Vendored
+4 -1
View File
@@ -80030,6 +80030,7 @@ const inputs = {
predicate: core.getInput('predicate'),
predicatePath: core.getInput('predicate-path'),
pushToRegistry: core.getBooleanInput('push-to-registry'),
showSummary: core.getBooleanInput('show-summary'),
githubToken: core.getInput('github-token'),
// undocumented -- not part of public interface
privateSigning: ['true', 'True', 'TRUE', '1'].includes(core.getInput('private-signing')),
@@ -80147,7 +80148,9 @@ async function run(inputs) {
});
}
}
logSummary(atts);
if (inputs.showSummary) {
logSummary(atts);
}
}
catch (err) {
// Fail the workflow run if an error occurs
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "actions/attest",
"version": "1.3.3",
"version": "1.4.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "actions/attest",
"version": "1.3.3",
"version": "1.4.0",
"license": "MIT",
"dependencies": {
"@actions/attest": "^1.3.0",
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "actions/attest",
"description": "Generate signed attestations for workflow artifacts",
"version": "1.3.3",
"version": "1.4.0",
"author": "",
"private": true,
"homepage": "https://github.com/actions/attest",
+1
View File
@@ -14,6 +14,7 @@ const inputs: RunInputs = {
predicate: core.getInput('predicate'),
predicatePath: core.getInput('predicate-path'),
pushToRegistry: core.getBooleanInput('push-to-registry'),
showSummary: core.getBooleanInput('show-summary'),
githubToken: core.getInput('github-token'),
// undocumented -- not part of public interface
privateSigning: ['true', 'True', 'TRUE', '1'].includes(
+4 -1
View File
@@ -17,6 +17,7 @@ export type RunInputs = SubjectInputs &
PredicateInputs & {
pushToRegistry: boolean
githubToken: string
showSummary: boolean
privateSigning: boolean
batchSize: number
}
@@ -96,7 +97,9 @@ export async function run(inputs: RunInputs): Promise<void> {
}
}
logSummary(atts)
if (inputs.showSummary) {
logSummary(atts)
}
} catch (err) {
// Fail the workflow run if an error occurs
core.setFailed(