Files
Genarrative/scripts/check-gitea-ci-job-runtime.sh
kdletters 2e02c28d0a
Project CI / Frontend tests (pull_request) Failing after 1m38s
Project CI / Repository checks (pull_request) Failing after 1m38s
Project CI / Native shell tests (pull_request) Failing after 13s
Project CI / Backend tests (pull_request) Failing after 3m23s
预构建Gitea CI工具链镜像
固定Node、Rust、Chrome与系统依赖并生成内容寻址镜像
四个CI任务改用genarrative-ci并保留独立npm ci
补充镜像构建装载导出和运行时沙箱校验脚本
同步开发运维文档与项目共享记忆
2026-07-22 14:58:05 +08:00

40 lines
768 B
Bash

#!/usr/bin/env bash
set -euo pipefail
bwrap_args=(
--die-with-parent
--unshare-all
--unshare-user
--disable-userns
--assert-userns-disabled
--cap-drop ALL
--clearenv
--ro-bind /usr /usr
)
for merged_path in /bin /sbin /lib /lib64; do
if [[ -L "${merged_path}" ]]; then
bwrap_args+=(--symlink "$(readlink "${merged_path}")" "${merged_path}")
fi
done
bwrap_args+=(
--proc /proc
--dev /dev
--tmpfs /tmp
--
/usr/bin/true
)
bwrap "${bwrap_args[@]}"
chrome_output="$(
timeout 30 google-chrome \
--headless=new \
--no-sandbox \
--disable-dev-shm-usage \
--disable-gpu \
--dump-dom \
'data:text/html,<title>genarrative-ci</title>' \
2>/dev/null
)"
rg -q '<title>genarrative-ci</title>' <<< "${chrome_output}"