-
Notifications
You must be signed in to change notification settings - Fork 0
/
autoconf.sh
49 lines (40 loc) · 893 Bytes
/
autoconf.sh
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
47
48
49
#!/bin/bash
set -e
if [ -z "${runner_name}" ]; then
echo "RUNNER_NAME must be set" 1>&2
exit 1
fi
if [ -z "${owner}" ]; then
echo "OWNER must be set" 1>&2
exit 1
fi
if [ -z "${repo_name}" ]; then
echo "Repository name must be set" 1>&2
exit 1
fi
LABEL=""
if [ -z "${label}" ]; then
LABEL=""
else
LABEL="${label}"
fi
if [ -z "${group}" ]; then
GROUP="Default"
else
GROUP="${group}"
fi
echo "TLS verify setting ${GITHUB_ACTIONS_RUNNER_TLS_NO_VERIFY}"
expect -c "
set timeout 10
spawn ./config.sh --url https://github.com/${owner}/${repo_name} --token ${TOKEN}
expect \"Enter the name of the runner group to add this runner to:\"
send \"${GROUP}\n\"
expect \"Enter the name of runner:\"
send \"${runner_name}\n\"
expect \"Enter any additional labels (ex. label-1,label-2):\"
send \"${LABEL}\n\"
expect \"Enter name of work folder:\"
send \"\n\"
expect \"$\"
exit 0
"