diff --git a/README.md b/README.md index 780069f..81df412 100644 --- a/README.md +++ b/README.md @@ -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: diff --git a/__tests__/main.test.ts b/__tests__/main.test.ts index da551c3..bd33cd9 100644 --- a/__tests__/main.test.ts +++ b/__tests__/main.test.ts @@ -44,6 +44,7 @@ const defaultInputs: main.RunInputs = { subjectDigest: '', subjectPath: '', pushToRegistry: false, + showSummary: true, githubToken: '', privateSigning: false, batchSize: 50 diff --git a/action.yml b/action.yml index 028ee4b..423e877 100644 --- a/action.yml +++ b/action.yml @@ -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. diff --git a/dist/index.js b/dist/index.js index 3fbb566..d4ed57e 100644 --- a/dist/index.js +++ b/dist/index.js @@ -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 diff --git a/package-lock.json b/package-lock.json index 2846d3c..e084c84 100644 --- a/package-lock.json +++ b/package-lock.json @@ -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", diff --git a/package.json b/package.json index 90d6384..a990bb1 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/index.ts b/src/index.ts index 20d3da3..a838090 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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( diff --git a/src/main.ts b/src/main.ts index e7e9c9e..638fd7e 100644 --- a/src/main.ts +++ b/src/main.ts @@ -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 { } } - logSummary(atts) + if (inputs.showSummary) { + logSummary(atts) + } } catch (err) { // Fail the workflow run if an error occurs core.setFailed(