feat: finish updates & adding github event support

This commit is contained in:
Joel Male
2024-03-28 13:00:21 +10:00
parent a976623266
commit 14b045decf
11 changed files with 234 additions and 26 deletions
+5 -5
View File
@@ -22,20 +22,20 @@ async function run() {
: null
const insecure = core.getInput('insecure')
? core.getInput('insecure') == 'true'
? core.getInput('insecure') === 'true'
: process.env.insecure
? process.env.insecure == 'true'
? process.env.insecure === 'true'
: false
const githubEvent = core.getInput('github_event') == 'true'
const githubEventPayload = core.getInput('github_event_payload') === 'true'
// if github_event is set to true, append it to the body
if (githubEvent) {
if (githubEventPayload) {
// decode the body
const decodedBody = JSON.parse(body || '{}')
// set the github event
decodedBody.github_event = context
decodedBody.githubEventPayload = context.payload || {}
// re-set the body
body = JSON.stringify(decodedBody)