crying
ci / docker (push) Has been cancelled Details

Signed-off-by: Sam Therapy <sam@samtherapy.net>
This commit is contained in:
Sam Therapy 2024-03-27 22:10:33 +01:00
parent bc386b346b
commit bc860ab2c4
Signed by: sam
GPG Key ID: 4D8B07C18F31ACBD
1 changed files with 4 additions and 9 deletions

13
run.ts
View File

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