kicad10_auto_node: KiBot KiCad 10 image with Node.js for Gitea Actions

Base ghcr.io/inti-cmnb/kicad10_auto_full:1.9.1-1_k10.0.5 (KiBot 1.9.1,
KiCad 10.0.5) plus Node.js 24.22.0 LTS from nodejs.org (SHA-256 checked).
act_runner runs JavaScript actions inside the job container; the KiBot
images have no Node. build.sh builds, tests and pushes
git.b4l.co.th/b4l/kicad10_auto_node:latest and a versioned tag.
This commit is contained in:
grabowski committed 2026-10-15 16:25:47 +07:00
commit 00ddaeba13
4 files changed
+127

No files matched your search

+1
View File
@@ -0,0 +1 @@
* text=auto eol=lf
+55
View File
@@ -0,0 +1,55 @@
# CI images for B4L Gitea Actions
Images the B4L runners use, published in the Gitea container registry of the
B4L organisation (public, so runners pull them without a login).
## kicad10_auto_node
KiBot's KiCad 10 image (`ghcr.io/inti-cmnb/kicad10_auto_full`) with Node.js
added. Gitea's act_runner runs JavaScript actions such as `actions/checkout`
inside the job container, and the KiBot images have no Node.
| | |
|---|---|
| Image | `git.b4l.co.th/b4l/kicad10_auto_node:latest` |
| Versioned tag | `<KiBot>_k<KiCad>_node<Node>`, e.g. `1.9.1-1_k10.0.5_node24.22.0` |
| Contents | KiBot 1.9.1, KiCad 10.0.5, Debian 13, Node.js 24 LTS with npm |
| Used by | runner label `kicad10_auto` (product template, LVSolarBuck, harNES) |
### Runner
In the runner's `config.yaml` (or its registration labels):
```yaml
runner:
labels:
- "kicad10_auto:docker://git.b4l.co.th/b4l/kicad10_auto_node:latest"
```
Restart the runner after changing labels. With the full registry name the
runner pulls the image whenever it is missing, so a `docker image prune` no
longer breaks the jobs. `container.force_pull: true` (act_runner's default) is
fine: with the layers cached, a pull only compares the manifest.
### Build and publish
```bash
docker login git.b4l.co.th # once; a token with write:package
./build.sh # build and test
./build.sh --push # build, test, push :latest and the versioned tag
```
For a newer KiBot or Node, set `BASE` and/or `NODE_VERSION`:
```bash
BASE=ghcr.io/inti-cmnb/kicad10_auto_full:<tag> NODE_VERSION=<x.y.z> ./build.sh --push
```
Base tags: https://github.com/INTI-CMNB/kicad_auto_full/pkgs/container/kicad10_auto_full ;
Node LTS: https://nodejs.org/dist/index.json .
### Not included
`typecad-docgen`, which the docgen workflows call: the npm package
`@typecad/typecad-docgen` is no longer published (checked 2026-10-15).
Once a replacement is chosen, add it with `NPM_GLOBAL="<package>" ./build.sh --push`.
+35
View File
@@ -0,0 +1,35 @@
#!/usr/bin/env bash
# Build, test and (with --push) publish kicad10_auto_node.
# ./build.sh build and test
# ./build.sh --push also push :latest and the versioned tag
# Newer base or Node: BASE=ghcr.io/inti-cmnb/kicad10_auto_full:<tag> NODE_VERSION=<x.y.z> ./build.sh --push
# Needs `docker login git.b4l.co.th` (a token with write:package) for --push.
set -euo pipefail
cd "$(dirname "$0")"
BASE=${BASE:-ghcr.io/inti-cmnb/kicad10_auto_full:1.9.1-1_k10.0.5_d13.2_b4.2.4LTS}
NODE_VERSION=${NODE_VERSION:-24.22.0}
REPO=${REPO:-git.b4l.co.th/b4l/kicad10_auto_node}
# KiBot 1.9.1-1, KiCad 10.0.5 -> 1.9.1-1_k10.0.5_node24.22.0
basetag=${BASE##*:}
TAG="$(printf '%s' "$basetag" | sed -E 's/^([^_]+_k[^_]+).*/\1/')_node${NODE_VERSION}"
docker build --pull \
--build-arg BASE="$BASE" --build-arg NODE_VERSION="$NODE_VERSION" \
--build-arg NPM_GLOBAL="${NPM_GLOBAL:-}" \
-t "$REPO:$TAG" -t "$REPO:latest" kicad10_auto_node
echo "== test $REPO:$TAG"
docker run --rm "$REPO:$TAG" bash -ec '
test "$(node --version)" = "v'"$NODE_VERSION"'"
node -e "require(\"https\"); require(\"child_process\"); console.log(\"node\", process.version)"
npm --version >/dev/null
kibot --version | head -1
echo "kicad-cli $(kicad-cli --version)"
git --version; python3 --version'
if [ "${1:-}" = "--push" ]; then
docker push "$REPO:$TAG"
docker push "$REPO:latest"
echo "pushed $REPO:$TAG and :latest"
fi
+36
View File
@@ -0,0 +1,36 @@
# KiBot's KiCad 10 image plus Node.js, for Gitea Actions.
#
# act_runner runs JavaScript actions (actions/checkout, upload-artifact) inside
# the job container, and the KiBot images have no Node. The runner label is
# kicad10_auto:docker://git.b4l.co.th/b4l/kicad10_auto_node:latest
# so a runner without the image pulls it, instead of every job installing Node.
#
# Build and push with ../build.sh (see ../README.md).
ARG BASE=ghcr.io/inti-cmnb/kicad10_auto_full:1.9.1-1_k10.0.5_d13.2_b4.2.4LTS
FROM ${BASE}
ARG BASE
ARG NODE_VERSION=24.22.0
# Extra global npm packages, space separated (none by default).
ARG NPM_GLOBAL=""
# Node.js from nodejs.org, checked against the release's SHA-256 list.
# The base image has no xz, so use the .tar.gz build.
RUN set -eux; \
file="node-v${NODE_VERSION}-linux-x64.tar.gz"; \
cd /tmp; \
curl -fsSLO "https://nodejs.org/dist/v${NODE_VERSION}/${file}"; \
curl -fsSLO "https://nodejs.org/dist/v${NODE_VERSION}/SHASUMS256.txt"; \
grep " ${file}\$" SHASUMS256.txt | sha256sum -c -; \
tar -xzf "${file}" -C /usr/local --strip-components=1 --no-same-owner \
--exclude='*/CHANGELOG.md' --exclude='*/README.md' --exclude='*/LICENSE'; \
rm -f "${file}" SHASUMS256.txt; \
if [ -n "${NPM_GLOBAL}" ]; then npm install -g --no-fund --no-audit ${NPM_GLOBAL}; fi; \
npm cache clean --force; \
node --version; npm --version
LABEL org.opencontainers.image.title="kicad10_auto_node" \
org.opencontainers.image.description="KiBot KiCad 10 image with Node.js for Gitea Actions" \
org.opencontainers.image.source="https://git.b4l.co.th/B4L/ci-images" \
org.opencontainers.image.base.name="${BASE}"