ci: fix container build script
Invoke docker build with Bun shell so commands run correctly, and document default automation behavior.
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
- To regenerate the JavaScript SDK, run `./packages/sdk/js/script/build.ts`.
|
- To regenerate the JavaScript SDK, run `./packages/sdk/js/script/build.ts`.
|
||||||
- ALWAYS USE PARALLEL TOOLS WHEN APPLICABLE.
|
- ALWAYS USE PARALLEL TOOLS WHEN APPLICABLE.
|
||||||
- The default branch in this repo is `dev`.
|
- The default branch in this repo is `dev`.
|
||||||
|
- Prefer automation: execute requested actions without confirmation unless blocked by missing info or safety/irreversibility.
|
||||||
|
|
||||||
## Style Guide
|
## Style Guide
|
||||||
|
|
||||||
|
|||||||
@@ -15,9 +15,12 @@ for (const name of images) {
|
|||||||
const image = `${reg}/build/${name}:${tag}`
|
const image = `${reg}/build/${name}:${tag}`
|
||||||
const file = `packages/containers/${name}/Dockerfile`
|
const file = `packages/containers/${name}/Dockerfile`
|
||||||
const arg = name === "base" ? "" : `--build-arg REGISTRY=${reg}`
|
const arg = name === "base" ? "" : `--build-arg REGISTRY=${reg}`
|
||||||
const cmd = `docker build -f ${file} -t ${image} ${arg} .`
|
console.log(`docker build -f ${file} -t ${image} ${arg} .`)
|
||||||
console.log(cmd)
|
if (arg) {
|
||||||
await $`${cmd}`
|
await $`docker build -f ${file} -t ${image} --build-arg REGISTRY=${reg} .`
|
||||||
|
} else {
|
||||||
|
await $`docker build -f ${file} -t ${image} .`
|
||||||
|
}
|
||||||
|
|
||||||
if (push) {
|
if (push) {
|
||||||
await $`docker push ${image}`
|
await $`docker push ${image}`
|
||||||
|
|||||||
Reference in New Issue
Block a user