Skip to content

Commit b521627

Browse files
committed
Add parameter support
- Add argument selector to runner-entrypoint - Add args to action.yml - Add example to README.md
1 parent 466ff58 commit b521627

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ jobs:
4646
4747
- name: 'run pipeline'
4848
uses: codefresh-io/codefresh-pipeline-runner@v5
49+
with:
50+
args: '-v key1=value1 -v key2=value2'
4951
env:
5052
PIPELINE_NAME: 'codefresh-pipeline'
5153
TRIGGER_NAME: 'codefresh-trigger'

action.yml

+6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
name: 'Codefresh pipeline runner'
22
description: 'Github action that runs codefresh pipeline'
33
author: 'codefresh-inc'
4+
inputs:
5+
args:
6+
description: 'codefresh cli build variables, see https://codefresh-io.github.io/cli/pipelines/run-pipeline/#setting-variables-through-the-command for more information.'
7+
required: false
48
branding:
59
icon: 'arrow-right-circle'
610
color: 'green'
711
runs:
812
using: 'docker'
913
image: 'Dockerfile'
14+
args:
15+
- ${{ inputs.args }}

runner-entrypoint.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ echo "Execute pipeline with branch $BRANCH"
2525

2626
if [ -n "$TRIGGER_NAME" ]
2727
then
28-
codefresh run $PIPELINE_NAME --trigger=$TRIGGER_NAME --branch=$BRANCH
28+
codefresh run $PIPELINE_NAME --trigger=$TRIGGER_NAME --branch=$BRANCH ${@:1}
2929
else
30-
codefresh run $PIPELINE_NAME --branch=$BRANCH
30+
codefresh run $PIPELINE_NAME --branch=$BRANCH ${@:1}
3131
fi

0 commit comments

Comments
 (0)