mirror of
https://github.com/1Password/load-secrets-action.git
synced 2026-06-21 14:23:48 +00:00
rebuild
This commit is contained in:
Vendored
+5
-2
@@ -38392,11 +38392,14 @@ const extractSecret = (envName, shouldExportEnv) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
const loadSecrets = async (shouldExportEnv) => {
|
const loadSecrets = async (shouldExportEnv) => {
|
||||||
// Pass User-Agent Information to the 1Password CLI
|
// Pass User-Agent Information to the 1Password CLI.
|
||||||
|
// Strip any prerelease suffix ("-beta.1") since semverToInt only
|
||||||
|
// accepts a plain MAJOR.MINOR.PATCH; a prerelease produces an invalid build.
|
||||||
|
const [releaseVersion] = package_namespaceObject.rE.split("-");
|
||||||
(0,dist.setClientInfo)({
|
(0,dist.setClientInfo)({
|
||||||
name: "1Password GitHub Action",
|
name: "1Password GitHub Action",
|
||||||
id: "GHA",
|
id: "GHA",
|
||||||
build: (0,dist.semverToInt)(package_namespaceObject.rE),
|
build: (0,dist.semverToInt)(releaseVersion ?? package_namespaceObject.rE),
|
||||||
});
|
});
|
||||||
// Load secrets from environment variables using 1Password CLI.
|
// Load secrets from environment variables using 1Password CLI.
|
||||||
// Iterate over them to find 1Password references, extract the secret values,
|
// Iterate over them to find 1Password references, extract the secret values,
|
||||||
|
|||||||
@@ -78,7 +78,12 @@ describe("loadSecretsFromSDK", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("masks the integration key and strips its base64 padding", async () => {
|
it("masks the integration key and strips its base64 padding", async () => {
|
||||||
await loadSecretsFromSDK(workloadId, environmentId, "integration-key==", false);
|
await loadSecretsFromSDK(
|
||||||
|
workloadId,
|
||||||
|
environmentId,
|
||||||
|
"integration-key==",
|
||||||
|
false,
|
||||||
|
);
|
||||||
|
|
||||||
expect(core.setSecret).toHaveBeenCalledWith("integration-key");
|
expect(core.setSecret).toHaveBeenCalledWith("integration-key");
|
||||||
});
|
});
|
||||||
|
|||||||
+5
-2
@@ -111,11 +111,14 @@ export const extractSecret = (
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const loadSecrets = async (shouldExportEnv: boolean): Promise<void> => {
|
export const loadSecrets = async (shouldExportEnv: boolean): Promise<void> => {
|
||||||
// Pass User-Agent Information to the 1Password CLI
|
// Pass User-Agent Information to the 1Password CLI.
|
||||||
|
// Strip any prerelease suffix ("-beta.1") since semverToInt only
|
||||||
|
// accepts a plain MAJOR.MINOR.PATCH; a prerelease produces an invalid build.
|
||||||
|
const [releaseVersion] = version.split("-");
|
||||||
setClientInfo({
|
setClientInfo({
|
||||||
name: "1Password GitHub Action",
|
name: "1Password GitHub Action",
|
||||||
id: "GHA",
|
id: "GHA",
|
||||||
build: semverToInt(version),
|
build: semverToInt(releaseVersion ?? version),
|
||||||
});
|
});
|
||||||
|
|
||||||
// Load secrets from environment variables using 1Password CLI.
|
// Load secrets from environment variables using 1Password CLI.
|
||||||
|
|||||||
Reference in New Issue
Block a user