Set NODE_USE_ENV_PROXY in main.js and update workflow

Moved NODE_USE_ENV_PROXY environment variable assignment from the GitHub Actions workflow to main.js for consistent runtime configuration. This change ensures the variable is always set when the application runs, regardless of workflow environment settings.
This commit is contained in:
Parker Brown
2025-08-22 12:31:42 -07:00
parent 926b8abad2
commit fe4ba3360a
2 changed files with 3 additions and 2 deletions
-1
View File
@@ -45,7 +45,6 @@ jobs:
- uses: ./ # Uses the action in the root directory - uses: ./ # Uses the action in the root directory
id: test id: test
env: env:
NODE_USE_ENV_PROXY: 1
https_proxy: https://example.com https_proxy: https://example.com
with: with:
app-id: ${{ vars.TEST_APP_ID }} app-id: ${{ vars.TEST_APP_ID }}
+3 -1
View File
@@ -15,6 +15,8 @@ if (!process.env.GITHUB_REPOSITORY_OWNER) {
throw new Error("GITHUB_REPOSITORY_OWNER missing, must be set to '<owner>'"); throw new Error("GITHUB_REPOSITORY_OWNER missing, must be set to '<owner>'");
} }
process.env.NODE_USE_ENV_PROXY = "1";
const appId = core.getInput("app-id"); const appId = core.getInput("app-id");
const privateKey = core.getInput("private-key"); const privateKey = core.getInput("private-key");
const owner = core.getInput("owner"); const owner = core.getInput("owner");
@@ -38,7 +40,7 @@ export default main(
core, core,
createAppAuth, createAppAuth,
request, request,
skipTokenRevoke, skipTokenRevoke
).catch((error) => { ).catch((error) => {
/* c8 ignore next 3 */ /* c8 ignore next 3 */
console.error(error); console.error(error);