File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change 22
33echo ------------------
44
5- cat /github/workflow/event.json
5+ # parse branch
6+ BRANCH=$( cat /github/workflow/event.json | jq -r .ref | awk -F ' /' ' {print $3}' )
67
7- # codefresh auth create-context mycontext --api-key $CF_API_KEY
8- # codefresh auth use-contex mycontext
8+ if [-z " $BRANCH " ]
9+ then
10+ BRANCH=$( cat /github/workflow/event.json | jq -r head.ref)
11+ fi
912
10- # cd $GITHUB_EVENT_PATH
11- # cat ../workspace/event.json
13+ codefresh auth create-context mycontext --api-key $CF_API_KEY
14+ codefresh auth use-contex mycontext
1215
13- # codefresh run $PIPELINE_NAME --trigger=$TRIGGER_NAME --sha=$GITHUB_SHA --branch=$BRANCH
16+ codefresh run $PIPELINE_NAME --trigger=$TRIGGER_NAME --sha=$GITHUB_SHA --branch=$BRANCH
1417
15- echo =======================
18+ echo =======================
You can’t perform that action at this time.
0 commit comments