Using dotenv package instead of experimental API process.loadEnvFile

Signed-off-by: Willi Carlsen <carlsenwilli@gmail.com>
This commit is contained in:
Willi Carlsen
2025-09-06 07:37:10 +02:00
parent 1850a6b487
commit 0ff92dd768
3 changed files with 16 additions and 1 deletions

View File

@@ -1,6 +1,7 @@
import * as core from "@actions/core";
import { validateCli } from "@1password/op-js";
import { installCliOnGithubActionRunner } from "op-cli-installer";
import dotenv from "dotenv";
import { loadSecrets, unsetPrevious, validateAuth } from "./utils";
import { envFilePath } from "./constants";
@@ -22,7 +23,7 @@ const loadSecretsAction = async () => {
const file = process.env[envFilePath];
if (file) {
core.info(`Loading environment variables from file: ${file}`);
process.loadEnvFile(file);
dotenv.config({ path: file });
}
// Download and install the CLI