Remove artifacts

This commit is contained in:
Colin McDonnell
2026-01-13 06:26:15 +00:00
parent b2735b2916
commit 8596da9093
2 changed files with 218 additions and 205 deletions
+209 -204
View File
File diff suppressed because it is too large Load Diff
+9 -1
View File
@@ -5,13 +5,21 @@
*/ */
import * as core from "@actions/core"; import * as core from "@actions/core";
import { resolve, isAbsolute } from "path";
import { Inputs, main } from "./main.ts"; import { Inputs, main } from "./main.ts";
import { log } from "./utils/cli.ts"; import { log } from "./utils/cli.ts";
async function run(): Promise<void> { async function run(): Promise<void> {
// Change to cwd input or GITHUB_WORKSPACE (where actions/checkout puts the repo) // Change to cwd input or GITHUB_WORKSPACE (where actions/checkout puts the repo)
// JavaScript actions run from the action's directory, not the checked out repo // JavaScript actions run from the action's directory, not the checked out repo
const cwd = core.getInput("cwd") || process.env.GITHUB_WORKSPACE; const cwdInput = core.getInput("cwd");
let cwd = cwdInput || process.env.GITHUB_WORKSPACE;
// resolve relative paths against GITHUB_WORKSPACE
if (cwdInput && !isAbsolute(cwdInput) && process.env.GITHUB_WORKSPACE) {
cwd = resolve(process.env.GITHUB_WORKSPACE, cwdInput);
}
if (cwd && process.cwd() !== cwd) { if (cwd && process.cwd() !== cwd) {
log.debug(`changing to working directory: ${cwd}`); log.debug(`changing to working directory: ${cwd}`);
process.chdir(cwd); process.chdir(cwd);