Skip to content

Commit

Permalink
Add subcommand input to the Github Action
Browse files Browse the repository at this point in the history
Defaults at files

Signed-off-by: Marco Franssen <marco.franssen@philips.com>
  • Loading branch information
marcofranssen committed Nov 30, 2021
1 parent b8149b4 commit d5263fa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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` | |
Expand Down
7 changes: 6 additions & 1 deletion action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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"
Expand Down

0 comments on commit d5263fa

Please sign in to comment.