-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathindex.js
35 lines (31 loc) · 941 Bytes
/
index.js
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
const core = require("@actions/core")
const { notifyReleaseManager } = require("./src/notify.js")
async function run() {
try {
const module = core.getInput("module")
const url = core.getInput("url")
const environment = core.getInput("environment")
const upstreamBuilds = core.getInput("upstream_builds") || "[]"
const upstreamRef = core.getInput("upstream_ref")
const version = core.getInput("version")
const newUpstreamBuilds = await notifyReleaseManager(
module,
url,
environment,
upstreamBuilds,
upstreamRef,
version
)
core.info(
`submitted notification for module: ${module} with:\n` +
`\turl: ${url}\n` +
`\tenvironment: ${environment}\n` +
`\tupstream builds: ${newUpstreamBuilds}\n` +
`\tupstream_ref: ${upstreamRef}\n` +
`\tversion: ${version}`
)
} catch (error) {
core.setFailed(error)
}
}
run()