-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathentrypoint.sh
More file actions
executable file
·46 lines (37 loc) · 1.45 KB
/
entrypoint.sh
File metadata and controls
executable file
·46 lines (37 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/env bash
echo "Environment Variables:"
echo " Workflow: $GITHUB_WORKFLOW"
echo " Action: $GITHUB_ACTION"
echo " Actor: $GITHUB_ACTOR"
echo " Repository: $GITHUB_REPOSITORY"
echo " Event-name: $GITHUB_EVENT_NAME"
echo " Event-path: $GITHUB_EVENT_PATH"
echo " Workspace: $GITHUB_WORKSPACE"
echo " SHA: $GITHUB_SHA"
echo " REF: $GITHUB_REF"
echo " HEAD-REF: $GITHUB_HEAD_REF"
echo " BASE-REF: $GITHUB_BASE_REF"
echo " PWD: $(pwd)"
git config --global user.name "$GITHUB_ACTOR"
git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com"
SRC_PATH=$GITHUB_WORKSPACE/$1
BLUEZ_PATH=$GITHUB_WORKSPACE/$2
OUTPUT_PATH=$GITHUB_WORKSPACE/$3
echo "Input Parameters"
echo " Source Path: $SRC_PATH"
echo " Bluez Path: $BLUEZ_PATH"
echo " Output Path: $OUTPUT_PATH"
if [ -z "$GITHUB_TOKEN" ]; then
echo "Set GITHUB_TOKEN environment variable"
exit 1
fi
# Copy tester.config from the upstream repo
wget --no-verbose --no-check-certificate \
https://git.kernel.org/pub/scm/bluetooth/bluez.git/plain/doc/tester.config \
-P $GITHUB_WORKSPACE/ && cp $GITHUB_WORKSPACE/tester.config /tester.config
# Clone ELL
git clone --depth=1 https://git.kernel.org/pub/scm/libs/ell/ell.git $GITHUB_WORKSPACE/ell
# Get PR number from GITHUB_REF (refs/pull/#/merge)
PR=${GITHUB_REF#"refs/pull/"}
PR=${PR%"/merge"}
/run-ci.py -c /config.ini -p $PR -r $GITHUB_REPOSITORY -s $SRC_PATH -b $BLUEZ_PATH -o $OUTPUT_PATH -v