Update stuff
Build and Push Spoon Images / quality (push) Successful in 2m28s
Build and Push Spoon Images / build-images (push) Successful in 9m53s

This commit is contained in:
Gabriel Brown
2026-06-23 22:27:23 -04:00
parent 4fee7bf50d
commit 980a2c07e8
10 changed files with 136 additions and 24 deletions
+15 -2
View File
@@ -1,4 +1,5 @@
import { execa } from 'execa';
import path from 'node:path';
import { env } from '../env';
@@ -17,13 +18,25 @@ const networkArgs = () => (env.network ? ['--network', env.network] : []);
const containerRuntime = () => env.containerRuntime;
const hostWorkspacePath = (workdir: string) => {
if (!env.hostWorkdir) return workdir;
const workerRoot = path.resolve(env.workdir);
const resolvedWorkdir = path.resolve(workdir);
const relative = path.relative(workerRoot, resolvedWorkdir);
if (relative.startsWith('..') || path.isAbsolute(relative)) {
return workdir;
}
return path.join(env.hostWorkdir, relative);
};
export const jobWorkspaceVolumeSpec = (workdir: string) => {
const volumeOptions =
env.containerVolumeOptions ??
(containerRuntime().endsWith('podman') ? 'Z' : undefined);
const source = hostWorkspacePath(workdir);
return volumeOptions
? `${workdir}:/workspace:${volumeOptions}`
: `${workdir}:/workspace`;
? `${source}:/workspace:${volumeOptions}`
: `${source}:/workspace`;
};
export const runInJobContainer = async (args: {