Skip to content

Commit 1bdd738

Browse files
test run
1 parent 19e66b2 commit 1bdd738

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

runner-entrypoint.sh

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,17 @@
22

33
echo ------------------
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 =======================

0 commit comments

Comments
 (0)