Skip to content

Commit c563a2b

Browse files
Merge pull request #6 from theteng/add-support-for-parameters
Add parameter support
2 parents 466ff58 + c92cfe2 commit c563a2b

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
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

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh
1+
#!/bin/bash
22

33
# parse branch
44
if [ -f $GITHUB_EVENT_PATH ]; then
@@ -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)