Skip to content

Commit d630300

Browse files
committed
Removes auth unused files
1 parent e796fc6 commit d630300

1 file changed

Lines changed: 12 additions & 15 deletions

File tree

.github/actions/auth/src/index.ts

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import type { AuthContextOutput } from "./types.d.js";
2-
import crypto from "node:crypto";
32
import process from "node:process";
4-
import * as url from "node:url";
53
import core from "@actions/core";
64
import playwright from "playwright";
75

@@ -18,13 +16,6 @@ export default async function () {
1816
const password = core.getInput("password", { required: true });
1917
core.setSecret(password);
2018

21-
// Determine storage path for authenticated session state
22-
// Playwright will create missing directories, if needed
23-
const actionDirectory = `${url.fileURLToPath(new URL(import.meta.url))}/..`;
24-
const sessionStatePath = `${
25-
process.env.RUNNER_TEMP ?? actionDirectory
26-
}/.auth/${crypto.randomUUID()}/sessionState.json`;
27-
2819
// Launch a headless browser
2920
browser = await playwright.chromium.launch({
3021
headless: true,
@@ -76,13 +67,19 @@ export default async function () {
7667
username,
7768
password,
7869
cookies,
79-
localStorage: origins.reduce((acc, { origin, localStorage }) => {
80-
acc[origin] = localStorage.reduce((acc, { name, value }) => {
81-
acc[name] = value;
70+
localStorage: origins.reduce(
71+
(acc, { origin, localStorage }) => {
72+
acc[origin] = localStorage.reduce(
73+
(acc, { name, value }) => {
74+
acc[name] = value;
75+
return acc;
76+
},
77+
{} as Record<string, string>,
78+
);
8279
return acc;
83-
}, {} as Record<string, string>);
84-
return acc;
85-
}, {} as Record<string, Record<string, string>>),
80+
},
81+
{} as Record<string, Record<string, string>>,
82+
),
8683
};
8784
core.setOutput("auth_context", JSON.stringify(authContextOutput));
8885
core.debug("Output: 'auth_context'");

0 commit comments

Comments
 (0)