mirror of
https://github.com/joelwmale/webhook-action.git
synced 2026-08-24 00:49:00 +08:00
Small fixes to action.yml and action output
This commit is contained in:
+2
-5
@@ -1,7 +1,6 @@
|
||||
import * as core from '@actions/core';
|
||||
import { http } from './http';
|
||||
|
||||
// most @actions toolkit packages have async methods
|
||||
async function run() {
|
||||
try {
|
||||
const url = core.getInput('url');
|
||||
@@ -15,13 +14,11 @@ async function run() {
|
||||
core.debug((new Date()).toTimeString()); // debug is only output if you set the secret `ACTIONS_RUNNER_DEBUG` to true
|
||||
|
||||
// make the request
|
||||
http.make(url, headers, body).then((res) => console.log('hi'));
|
||||
http.make(url, headers, body)
|
||||
.then((res) => core.setOutput('statusCode', res.status));
|
||||
|
||||
// debug end
|
||||
core.info((new Date()).toTimeString());
|
||||
|
||||
// output the time it took
|
||||
core.setOutput('time', new Date().toTimeString());
|
||||
} catch (error) {
|
||||
core.setFailed(error.message);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user