mirror of
https://github.com/joelwmale/webhook-action.git
synced 2026-08-24 00:49:00 +08:00
* v2.0.0 (#12) - Convert project to Javascript/Typescript - Allow custom headers to be passed in (optional) - Allow body to be optional * Update action.yml * Update action.yml * Add support for environment variables (fixed #17) * Add support for header as environment variables * Run build and package Co-authored-by: Joel Male <joel@joelmale.com>
This commit is contained in:
co-authored by
Joel Male
parent
e22e83d67d
commit
517289c047
+4
-4
@@ -2,9 +2,9 @@ import * as core from '@actions/core';
|
||||
import { http } from './http';
|
||||
|
||||
async function run() {
|
||||
const url = core.getInput('url');
|
||||
const headers = core.getInput('headers') ?? null;
|
||||
const body = core.getInput('body') ?? null;
|
||||
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;
|
||||
|
||||
// initial info
|
||||
core.info(`Sending webhook request to ${url}`);
|
||||
@@ -28,4 +28,4 @@ async function run() {
|
||||
});
|
||||
}
|
||||
|
||||
run();
|
||||
run();
|
||||
|
||||
Reference in New Issue
Block a user