Skip to content

Commit

Permalink
Merge pull request #6 from theteng/add-support-for-parameters
Browse files Browse the repository at this point in the history
Add parameter support
  • Loading branch information
pasha-codefresh authored Feb 10, 2021
2 parents 466ff58 + c92cfe2 commit c563a2b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
6 changes: 6 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -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 }}
6 changes: 3 additions & 3 deletions runner-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash

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

0 comments on commit c563a2b

Please sign in to comment.