Add support for environment variables (fixed #17) (#19)

* 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:
Anand Chowdhary
2020-08-27 18:14:30 +10:00
committed by GitHub
co-authored by Joel Male
parent e22e83d67d
commit 517289c047
9 changed files with 16 additions and 16 deletions
+4 -4
View File
@@ -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();