Skip to content

Commit

Permalink
version 1.9.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrurodr committed Mar 4, 2022
1 parent d11df3b commit 88e6ce4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lib/input.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,15 @@ function getInputs() {
const proxyHost = core.getInput('proxyHost', { required: false, trimWhitespace: true });
const proxyPort = utils_1.asNumber(core.getInput('proxyPort', { required: false, trimWhitespace: true }));
if (proxyHost && proxyPort) {
process.env['http_proxy'] = `http://${proxyHost}:${proxyPort}`;
process.env['https_proxy'] = `http://${proxyHost}:${proxyPort}`;
delete process.env['http_proxy'];
delete process.env['https_proxy'];
delete process.env['HTTP_PROXY'];
delete process.env['HTTPS_PROXY'];
const proxy = `http://${proxyHost}:${proxyPort}`;
process.env['http_proxy'] = proxy;
process.env['https_proxy'] = proxy;
process.env['HTTP_PROXY'] = proxy;
process.env['HTTPS_PROXY'] = proxy;
}
const inputs = {
webhooks: webhooks,
Expand Down
2 changes: 2 additions & 0 deletions lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ function wrapWebhook(webhook, payload) {
return function () {
return __awaiter(this, void 0, void 0, function* () {
try {
utils_1.logInfo(process.env['http_proxy'] || process.env['HTTP_PROXY'] || 'no http proxy setted');
utils_1.logInfo(process.env['https_proxy'] || process.env['HTTPS_PROXY'] || 'no https proxy setted');
yield axios_1.default.post(webhook, payload);
}
catch (e) {
Expand Down

0 comments on commit 88e6ce4

Please sign in to comment.