Skip to content

Commit 2464c9f

Browse files
committed
refactor(infra/actions): fix CI detection to actually choose a branch, and also inspect the CI variable
1 parent 01ac706 commit 2464c9f

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

scripts/ci/main.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@ import { notice } from '@actions/core';
22
import { bold } from '@std/fmt/colors';
33

44
export async function main(): Promise<void> {
5-
if (Deno.env.get('CI')) {
6-
console.log("We're in a CI environment!");
7-
}
5+
const ci = Deno.env.get('CI');
86

9-
console.log(`We are ${bold('not')} in a CI environment!`);
7+
if (ci) {
8+
console.log("We're in a CI environment!", { ci });
9+
} else {
10+
console.log(`We are ${bold('not')} in a CI environment!`);
11+
}
1012
}
1113

1214
if (import.meta.main) {

0 commit comments

Comments
 (0)