File tree Expand file tree Collapse file tree 3 files changed +30
-0
lines changed
Expand file tree Collapse file tree 3 files changed +30
-0
lines changed Original file line number Diff line number Diff line change 1+ FROM codefresh/cli
2+
3+ LABEL "com.github.actions.name" ="codefresh-pipeline-runner"
4+ LABEL "com.github.actions.description" ="allows to run custom codefresh pipelines"
5+ LABEL "com.github.actions.icon" ="play-circle"
6+ LABEL "com.github.actions.color" ="green"
7+
8+ LABEL "repository" ="https://github.com/codefresh-io/codefresh-pipeline-runner"
9+ LABEL "homepage" ="https://github.com/codefresh-io/codefresh-pipeline-runner"
10+ LABEL "maintainer" ="<denys@codefresh.io>"
11+
12+ ADD runner-entrypoint.sh /runner-entrypoint.sh
13+
14+ ENTRYPOINT ["/runner-entrypoint.sh" ]
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ # parse branch
4+ # in case of push event
5+ BRANCH=$( cat $GITHUB_EVENT_PATH | jq -r .ref | awk -F ' /' ' {print $3}' )
6+
7+ if [-z " $BRANCH " ]
8+ then
9+ # in case of pullresuest event
10+ BRANCH=$( cat $GITHUB_EVENT_PATH | jq -r head.ref)
11+ fi
12+
13+ codefresh auth create-context mycontext --api-key $CF_API_KEY
14+ codefresh auth use-contex mycontext
15+
16+ codefresh run $PIPELINE_NAME --trigger=$TRIGGER_NAME --sha=$GITHUB_SHA --branch=$BRANCH
You can’t perform that action at this time.
0 commit comments