add show-summary input (#108)
Signed-off-by: Brian DeHamer <bdehamer@github.com>
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -44,6 +44,7 @@ const defaultInputs: main.RunInputs = {
|
||||
subjectDigest: '',
|
||||
subjectPath: '',
|
||||
pushToRegistry: false,
|
||||
showSummary: true,
|
||||
githubToken: '',
|
||||
privateSigning: false,
|
||||
batchSize: 50
|
||||
|
||||
@@ -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.
|
||||
|
||||
+4
-1
@@ -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
|
||||
|
||||
Generated
+2
-2
@@ -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
@@ -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",
|
||||
|
||||
@@ -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
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user