Update logging for debug purposes

This commit is contained in:
Joel Male
2020-08-26 10:25:43 +10:00
parent a2c63f8d08
commit d4413d8be7
9 changed files with 19 additions and 8 deletions
+7 -2
View File
@@ -8,14 +8,19 @@ async function run() {
const body = core.getInput('body') ?? '';
// initial info
core.info(`Sending webhook request to ${url}...`);
core.info(`Sending webhook request to ${url}`);
// debug start
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) => core.setOutput('statusCode', res.status));
.then((res) => {
// output the status
core.setOutput('statusCode', res.status);
// report on the status code
core.info(`Received status code: ${res.status}`);
});
// debug end
core.info((new Date()).toTimeString());