Skip to content

Commit

Permalink
Switch to composite action to dynamically build the image args
Browse files Browse the repository at this point in the history
Signed-off-by: Marco Franssen <marco.franssen@philips.com>
  • Loading branch information
marcofranssen committed Dec 22, 2021
1 parent a28c1a8 commit c4d4dc4
Showing 1 changed file with 20 additions and 10 deletions.
30 changes: 20 additions & 10 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,23 @@ inputs:
description: 'commandline options for the given subcommand'
required: true
runs:
using: 'docker'
image: 'docker://ghcr.io/philips-labs/slsa-provenance:v0.4.0'
args:
- '${{ inputs.command }}'
- '${{ inputs.subcommand }}'
- "--github-context"
- '${{ inputs.github_context }}'
- "--runner-context"
- '${{ inputs.runner_context }}'
- ${{ inputs.arguments }}
using: 'composite'
steps:
- name: compose arguments
id: compose-args
shell: bash
run: |
args=(
'${{ inputs.command }}'
'${{ inputs.subcommand }}'
"--github-context"
'${{ inputs.github_context }}'
"--runner-context"
'${{ inputs.runner_context }}'
${{ inputs.arguments }}
)
echo "::set-output name=provenance_args::$(echo "[${args[*]// /,}]")"
- uses: 'docker://ghcr.io/philips-labs/slsa-provenance:v0.4.0'
with:
args: ${{ fromJSON(steps.compose-args.outputs.provenance_args }}

0 comments on commit c4d4dc4

Please sign in to comment.