oops
ci / docker (push) Failing after 29s Details

Signed-off-by: Sam Therapy <sam@samtherapy.net>
This commit is contained in:
Sam Therapy 2024-03-27 21:55:30 +01:00
parent b20af54b80
commit fd5c31b893
Signed by: sam
GPG Key ID: 4D8B07C18F31ACBD
1 changed files with 4 additions and 4 deletions

8
run.ts
View File

@ -1,7 +1,5 @@
#!/usr/bin/env -S deno run --allow-read --allow-write --allow-run --allow-env --allow-sys --no-lock
const env = Deno.env.toObject();
function getEnv(key: string, required = false, errorMsg?: string) {
key = key.toUpperCase();
if (env[key]) return env[key];
@ -25,12 +23,14 @@ Deno.env.set(
),
);
const env = Deno.env.toObject();
let temp = getEnv("ENTRY-POINT")
if (temp) {
Deno.env.set("ENTRYPOINT", temp);
}
temp = getEnv("Project", true, "An entrypoint is required");
temp = getEnv("PROJECT", true, "An project is required");
const flags = [`-p=${temp}`];
temp = getEnv("EXCLUDE");
@ -66,7 +66,7 @@ const command = new Deno.Command("deployctl", {
args: [
"deploy",
...flags,
getEnv("ENTRYPOINT", true, "An entrypoint is required"),
getEnv("ENTRYPOINT", true, "An entrypoint is required!!"),
],
stdout: "piped",
stderr: "piped",