diff --git a/README.md b/README.md index 41f63ed..1a3dc3b 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,8 @@ jobs: - name: 'run pipeline' uses: codefresh-io/codefresh-pipeline-runner@v5 + with: + args: '-v key1=value1 -v key2=value2' env: PIPELINE_NAME: 'codefresh-pipeline' TRIGGER_NAME: 'codefresh-trigger' diff --git a/action.yml b/action.yml index 8eccec6..ba52678 100644 --- a/action.yml +++ b/action.yml @@ -1,9 +1,15 @@ name: 'Codefresh pipeline runner' description: 'Github action that runs codefresh pipeline' author: 'codefresh-inc' +inputs: + args: + description: 'codefresh cli build variables, see https://codefresh-io.github.io/cli/pipelines/run-pipeline/#setting-variables-through-the-command for more information.' + required: false branding: icon: 'arrow-right-circle' color: 'green' runs: using: 'docker' image: 'Dockerfile' + args: + - ${{ inputs.args }} diff --git a/runner-entrypoint.sh b/runner-entrypoint.sh index 4cecba2..85b5cc3 100755 --- a/runner-entrypoint.sh +++ b/runner-entrypoint.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # parse branch if [ -f $GITHUB_EVENT_PATH ]; then @@ -25,7 +25,7 @@ echo "Execute pipeline with branch $BRANCH" if [ -n "$TRIGGER_NAME" ] then - codefresh run $PIPELINE_NAME --trigger=$TRIGGER_NAME --branch=$BRANCH + codefresh run $PIPELINE_NAME --trigger=$TRIGGER_NAME --branch=$BRANCH ${@:1} else - codefresh run $PIPELINE_NAME --branch=$BRANCH + codefresh run $PIPELINE_NAME --branch=$BRANCH ${@:1} fi