This commit is contained in:
Joel Male
2020-08-27 18:23:33 +10:00
parent 9fa1db0dd2
commit 01d242f5b1
109 changed files with 198798 additions and 322059 deletions
+9 -3
View File
@@ -2,9 +2,15 @@ import * as core from '@actions/core';
import { http } from './http';
async function run() {
const url = core.getInput('url') ?? process.env.WEBHOOK_URL;
const headers = core.getInput('headers') ?? process.env.HEADERS ?? null;
const body = core.getInput('body') ?? process.env.data ?? null;
const url = core.getInput('url') ? core.getInput('url') : (process.env.url ? process.env.url : '');
const headers = core.getInput('headers') ? core.getInput('headers') : (process.env.headers ? process.env.headers : null);
const body = core.getInput('body') ? core.getInput('body') : (process.env.body ? process.env.body : null);
if (!url) {
// validate a url
core.setFailed('A url is required to run this action.');
return;
}
// initial info
core.info(`Sending webhook request to ${url}`);