summaryrefslogtreecommitdiff
path: root/worker/scripts
diff options
context:
space:
mode:
authorElizabeth Hunt <me@liz.coffee>2025-07-01 10:23:26 -0700
committerElizabeth Hunt <me@liz.coffee>2025-07-01 10:24:57 -0700
commitf556523d908ed2ae836fe077f11c5a1b724d459a (patch)
tree8424ab110ae21aeef5f1ae4cc3641aa100e08a15 /worker/scripts
parent8fbbe6396f400a9a50d4686c39969470edf2a246 (diff)
downloadci-f556523d908ed2ae836fe077f11c5a1b724d459a.tar.gz
ci-f556523d908ed2ae836fe077f11c5a1b724d459a.zip
Cache apt ops better, lift constants
Diffstat (limited to 'worker/scripts')
-rwxr-xr-xworker/scripts/checkout_ci.ts18
1 files changed, 9 insertions, 9 deletions
diff --git a/worker/scripts/checkout_ci.ts b/worker/scripts/checkout_ci.ts
index dade7c4..0a8b30d 100755
--- a/worker/scripts/checkout_ci.ts
+++ b/worker/scripts/checkout_ci.ts
@@ -18,6 +18,15 @@ import { join } from 'path';
import { type CheckoutCiJob, type FetchCodeJob, PipelineImpl } from '@emprespresso/ci_model';
import { executeJob, executePipeline } from '@emprespresso/ci_worker';
+export interface CiWorkflow {
+ workflow: string;
+}
+export function isCiWorkflow(t: unknown): t is CiWorkflow {
+ return isObject(t) && 'workflow' in t && typeof t.workflow === 'string' && !t.workflow.includes('..');
+}
+
+const CI_WORKFLOW_FILE = '.ci/ci.json';
+
const run = Date.now().toString();
const eitherJob = getRequiredEnvVars(['remote', 'refname', 'rev']).mapRight(
(baseArgs) =>
@@ -149,12 +158,3 @@ function getPipelineGenerationCommand(
'/pipeline_generator',
];
}
-
-export interface CiWorkflow {
- workflow: string;
-}
-export function isCiWorkflow(t: unknown): t is CiWorkflow {
- return isObject(t) && 'workflow' in t && typeof t.workflow === 'string' && !t.workflow.includes('..');
-}
-
-const CI_WORKFLOW_FILE = '.ci/ci.json';