-
Notifications
You must be signed in to change notification settings - Fork 0
/
nomad.hcl
44 lines (39 loc) · 880 Bytes
/
nomad.hcl
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
job "github_runner" {
datacenters = ["dc1"]
type = "system"
task "runner" {
config {
image = "ephemeral_image_name:tag"
privileged = true
volumes = [
"/var/run/docker.sock:/var/run/docker.sock",
"/home/github-runner:/home/github-runner",
]
}
driver = "docker"
env {
LABELS = "${attr.unique.hostname}"
}
restart {
attempts = 10
delay = "15s"
interval = "1m"
mode = "delay"
}
template {
change_mode = "noop"
data = <<EOH
{_ with secret "github/token/ephemeral-github-runners" _}{_ .Data.token _}{_ end _}
EOH
left_delimiter = "{_"
right_delimiter = "_}"
destination = "local/access-token.txt"
}
}
vault {
policies = [
"github-token-generator",
"secrets-services-ephemeral-github-runner"
]
}
}