Skip to content

Add parameter support #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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