From d5263fa0d504eeb5fdb0d4d0a9a811d80c33fe98 Mon Sep 17 00:00:00 2001 From: Marco Franssen Date: Wed, 24 Nov 2021 11:29:17 +0100 Subject: [PATCH] Add subcommand input to the Github Action Defaults at files Signed-off-by: Marco Franssen --- README.md | 3 ++- action.yaml | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c252a44e..223bd618 100644 --- a/README.md +++ b/README.md @@ -201,8 +201,9 @@ An action to generate SLSA build provenance for an artifact | parameter | description | required | default | | - | - | - | - | +| subcommand | The subcommand to use when generating provenance | `false` | files | | artifact_path | path to artifact or directory of artifacts | `true` | | -| output_path | path to write build provenance file | `true` | provenance.json | +| output_path | path to write build provenance file | `false` | provenance.json | | github_context | internal (do not set): the "github" context object in json | `true` | ${{ toJSON(github) }} | | runner_context | internal (do not set): the "runner" context object in json | `true` | ${{ toJSON(runner) }} | | tag_name | The github release to generate provenance on.\n (if set the artifacts will be downloaded from the release and the provenance will be added as an additional release asset.) | `false` | | diff --git a/action.yaml b/action.yaml index 0f021eda..b6d115a8 100644 --- a/action.yaml +++ b/action.yaml @@ -4,12 +4,16 @@ branding: icon: lock color: purple inputs: + subcommand: + description: 'The subcommand to use when generating provenance' + required: false + default: 'files' artifact_path: description: 'path to artifact or directory of artifacts' required: true output_path: description: 'path to write build provenance file' - required: true + required: false default: 'provenance.json' github_context: description: 'internal (do not set): the "github" context object in json' @@ -32,6 +36,7 @@ runs: image: 'docker://ghcr.io/philips-labs/slsa-provenance:v0.4.0' args: - "generate" + - '${{ inputs.subcommand }}' - "-artifact_path" - '${{ inputs.artifact_path }}' - "-output_path"