forked from nickodell/github-runner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-add-provisioners.json
83 lines (82 loc) · 3.07 KB
/
docker-add-provisioners.json
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
{
"provisioners": [
{
"type": "file",
"source": "{{template_dir}}/etc/systemd/system/github-runner.service",
"destination": "/etc/systemd/system/"
},
{
"type": "file",
"source": "{{template_dir}}/etc/systemd/system/github-runner.service.d",
"destination": "/etc/systemd/system/"
},
{
"type": "file",
"source": "{{template_dir}}/etc/systemd/system/github-runner-config.service",
"destination": "/etc/systemd/system/"
},
{
"type": "file",
"source": "{{template_dir}}/actions-runner-install.sh",
"destination": "{{user `runner_home`}}/actions-runner-install.sh"
},
{
"type": "file",
"source": "{{template_dir}}/actions-runner-config.sh",
"destination": "{{user `runner_home`}}/actions-runner-config.sh"
},
{
"type": "shell",
"inline": [
"chown root:root /etc/github-runner-env",
"chmod 0644 /etc/github-runner-env",
"chown -R root:root /etc/systemd/system/github*",
"chmod 0644 /etc/systemd/system/github*",
"chmod 0644 /etc/systemd/system/github-runner.service.d/docker-override.conf",
"chmod 0755 \"$RUNNER_HOME/actions-runner-install.sh\"",
"chmod 0755 \"$RUNNER_HOME/actions-runner-config.sh\""
],
"environment_vars": [
"RUNNER_HOME={{user `runner_home`}}"
],
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
},
{
"type": "shell",
"inline": [
"rm -fv \"$RUNNER_HOME/*.tar.gz\"",
"rm -fv \"$RUNNER_HOME/*.tar.bz2\"",
"rm -fv \"$RUNNER_HOME/*.deb\"",
"rm -fv \"$RUNNER_HOME/null\"",
"rm -fv \"$RUNNER_HOME/Release.key\"",
"rm -fv \"$RUNNER_HOME/install.sh\"",
"rm -frv \"$RUNNER_HOME/azcopy\""
],
"environment_vars": [
"RUNNER_HOME={{user `runner_home`}}"
],
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
},
{
"type": "shell",
"scripts": [
"{{template_dir}}/scripts/installers/awspowershell.sh",
"{{template_dir}}/scripts/installers/auto.sh"
],
"environment_vars": [
"METADATA_FILE={{user `metadata_file`}}",
"HELPER_SCRIPTS={{user `helper_script_folder`}}",
"DEBIAN_FRONTEND=noninteractive",
"RUNNER_HOME={{user `runner_home`}}"
],
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
},
{
"type": "shell",
"inline": [
"chown -R {{user `runner_user`}}:{{user `runner_user`}} /home/runner"
],
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
}
]
}