-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeployment.toml
More file actions
83 lines (76 loc) · 2.55 KB
/
Copy pathdeployment.toml
File metadata and controls
83 lines (76 loc) · 2.55 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
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
# obelisk-version-monitor — periodic workflow that records the `obelisk`
# version pinned in `dev-deps.txt` of every public obeli-sk repo, plus a
# webhook that displays the latest result.
[[activity_js]]
name = "list_repos"
location = "${DEPLOYMENT_DIR}/activity/list_repos.js"
ffqn = "obeli-sk:version-monitor/repos.list-repos"
return_type = "result<list<string>, string>"
[[activity_js.allowed_host]]
pattern = "https://api.github.com"
methods = ["GET"]
[[activity_js]]
name = "fetch_dev_deps"
location = "${DEPLOYMENT_DIR}/activity/fetch_dev_deps.js"
ffqn = "obeli-sk:version-monitor/repos.fetch-dev-deps"
params = [
{ name = "repo", type = "string" },
]
return_type = "result<string, variant { permanent-not-found, transient-error(string), execution-failed }>"
[[activity_js.allowed_host]]
pattern = "https://raw.githubusercontent.com"
methods = ["GET"]
[[activity_exec]]
name = "run_sync_flake_lock"
location = "${DEPLOYMENT_DIR}/activity/run_sync_flake_lock.sh"
ffqn = "obeli-sk:version-monitor/github.run-sync-flake-lock"
params = [
{ name = "repo", type = "string" },
]
return_type = "result<string, string>"
exec.lock_expiry.seconds = 30
max_retries = 0
env_vars = ["PATH", "GH_TOKEN"]
[[activity_exec]]
name = "merge_pull_request"
location = "${DEPLOYMENT_DIR}/activity/merge_pull_request.sh"
ffqn = "obeli-sk:version-monitor/github.merge-pull-request"
params = [
{ name = "repo", type = "string" },
{ name = "number", type = "u64" },
{ name = "head-sha", type = "string" },
]
return_type = "result<string, string>"
exec.lock_expiry.seconds = 30
max_retries = 0
env_vars = ["PATH", "GH_TOKEN"]
[[workflow_js]]
name = "monitor"
location = "${DEPLOYMENT_DIR}/workflow/monitor.js"
ffqn = "obeli-sk:version-monitor/monitor.run"
return_type = "result<list<tuple<string, string>>, string>"
[[webhook_endpoint_js]]
name = "show"
location = "${DEPLOYMENT_DIR}/webhook/show.js"
routes = [
{ methods = ["GET"], route = "/" },
{ methods = ["GET"], route = "/api/status" },
{ methods = ["GET"], route = "/bump/:repo" },
{ methods = ["POST"], route = "/merge/:repo/:number" },
]
env_vars = [
{ key = "OBELISK_API_URL", value = "${OBELISK_API_URL:-http://127.0.0.1:5005}" },
]
[[webhook_endpoint_js.allowed_host]]
pattern = "${OBELISK_API_URL:-http://127.0.0.1:5005}"
methods = ["GET"]
[[webhook_endpoint_js.allowed_host]]
pattern = "https://api.github.com"
methods = ["GET"]
[webhook_endpoint_js.allowed_host.secrets]
env_vars = ["GH_TOKEN"]
replace_in = ["headers"]
[[cron]]
name = "monitor_run"
ffqn = "obeli-sk:version-monitor/monitor.run"
schedule = "* * * * *" # every minute