Compare commits

..

3 Commits

Author SHA1 Message Date
csh db75d0ebc5 `gitea`的`runner`参数化,可以通过`docker-compose.yml`进行配置
Ubuntu System Information / show-system-info (push) Successful in 39s Details
🐛 修复`Dockerfile`缺少系统包
2025-12-10 14:42:20 +08:00
csh 1b5611cf3e 🐛 修复贡献者过滤自定义bot名称
Ubuntu System Information / show-system-info (push) Successful in 38s Details
2025-12-09 17:51:48 +08:00
ci[bot] 44e92ab89a 📝 Auto update CHANGELOG for 0.0.4-rc1 [skip ci]
Ubuntu System Information / show-system-info (push) Successful in 38s Details
2025-12-09 08:37:04 +00:00
8 changed files with 73 additions and 10 deletions

View File

@ -621,17 +621,20 @@ jobs:
echo "👥 收集贡献者..."
# 收集贡献者 (去除 bot)
# 动态过滤配置的 bot 用户名
if [ "$COMMIT_RANGE" = "HEAD" ]; then
CONTRIBUTORS=$(git log --pretty=format:"%an" --no-merges | \
grep -v "github-actions\[bot\]" | \
grep -v "dependabot\[bot\]" | \
grep -v "renovate\[bot\]" | \
grep -v "^${{ env.GIT_USER_NAME }}$" | \
sort -u)
else
CONTRIBUTORS=$(git log $COMMIT_RANGE --pretty=format:"%an" --no-merges | \
grep -v "github-actions\[bot\]" | \
grep -v "dependabot\[bot\]" | \
grep -v "renovate\[bot\]" | \
grep -v "^${{ env.GIT_USER_NAME }}$" | \
sort -u)
fi

View File

@ -1,5 +1,27 @@
# CHANGELOG
## :bookmark: 0.0.4
### :pencil: What's Changed
- :rocket: 优化bot名字更具辨识度 ([4829434](https://git.mytsl.cn/csh/actions-template/commit/4829434408f46ebfad41293c46c9de1d94b157f3)) by @csh
- :recycle: 重构代码和`docker-runner`项目结构
:sparkles: 支持`docker`部署`archlinux`,预装`clang`跨平台编译工具链
([39820e6](https://git.mytsl.cn/csh/actions-template/commit/39820e656a9822e3b31df93d0abc33c02b2e56d1)) by @csh
- :bug: 修复`lsb_release`命令报错 ([0e89b21](https://git.mytsl.cn/csh/actions-template/commit/0e89b21c415bb62e02bace18038195c82d6374c7)) by @csh
- :bug: Bug修复 ([eaedcd3](https://git.mytsl.cn/csh/actions-template/commit/eaedcd3bb21e9ec8ed58e03b63ad85761a77cb48)) by @csh
### :busts_in_silhouette: Contributors
<a href="https://git.mytsl.cn/ci-bot">
<img src="https://git.mytsl.cn/ci-bot.png" alt="ci-bot" width="35" height="35" style="border-radius: 50%;" onerror="this.src='https://git.mytsl.cn/assets/img/avatar_default.png'" />
</a>
<a href="https://git.mytsl.cn/csh">
<img src="https://git.mytsl.cn/csh.png" alt="csh" width="35" height="35" style="border-radius: 50%;" onerror="this.src='https://git.mytsl.cn/assets/img/avatar_default.png'" />
</a>
---
## :bookmark: 0.0.3
### :pencil: What's Changed

View File

@ -20,12 +20,17 @@ echo ""
# 获取注册信息并验证
while true; do
read -p "Enter Gitea instance URL (e.g., https://gitea.example.com): " GITEA_INSTANCE
if [ -n "${GITEA_INSTANCE:-}" ]; then
echo "Using Gitea instance from env: $GITEA_INSTANCE"
else
read -p "Enter Gitea instance URL (e.g., https://gitea.example.com): " GITEA_INSTANCE
fi
# 验证 URL 格式
if [[ ! "$GITEA_INSTANCE" =~ ^https?:// ]]; then
echo "✗ Error: URL must start with http:// or https://"
echo ""
unset GITEA_INSTANCE
continue
fi
@ -35,15 +40,20 @@ while true; do
break
done
read -p "Enter registration token: " GITEA_TOKEN
if [ -n "${GITEA_TOKEN:-}" ]; then
echo "Using registration token from env."
else
read -p "Enter registration token: " GITEA_TOKEN
fi
if [ -z "$GITEA_TOKEN" ]; then
echo "✗ Error: Token cannot be empty!"
exit 1
fi
read -p "Enter runner name (default: docker-runner): " RUNNER_NAME
RUNNER_NAME=${RUNNER_NAME:-docker-runner}
DEFAULT_NAME="${DEFAULT_RUNNER_NAME:-docker-runner}"
read -p "Enter runner name (default: $DEFAULT_NAME): " RUNNER_NAME
RUNNER_NAME=${RUNNER_NAME:-$DEFAULT_NAME}
# 多个 label逗号分隔无空格
# ubuntu-22.04:host://ubuntu:22.04,ubuntu-20.04:host://ubuntu:20.04,node:docker://node:18

View File

@ -23,16 +23,20 @@ RUN pacman -Syu --noconfirm && \
ninja \
curl \
git \
nodejs \
npm \
python \
python-pyyaml \
python-pip \
paru \
conan \
sudo \
vim \
supervisor \
qemu-user-static \
qemu-user-static-binfmt \
fakeroot \
docker \
docker-buildx \
&& pacman -Scc --noconfirm
# AUR 用户paru 需非 root 运行)
@ -43,7 +47,7 @@ RUN useradd -m aur && \
# 安装额外的 AUR 工具
USER aur
WORKDIR /home/aur
RUN paru -S --noconfirm --needed --noprogressbar llvm-mingw-w64-toolchain-ucrt-bin && \
RUN paru -S --noconfirm --needed --noprogressbar conan-bin llvm-mingw-w64-toolchain-ucrt-bin && \
paru -Scc --noconfirm && \
rm -rf ~/.cache/paru
@ -51,6 +55,10 @@ RUN paru -S --noconfirm --needed --noprogressbar llvm-mingw-w64-toolchain-ucrt-b
USER root
WORKDIR /root
# 交叉工具链可用:确保 windres 在 PATH避免 CMake 查找失败
ENV PATH="/opt/llvm-mingw/llvm-mingw-ucrt/bin:${PATH}"
ENV RC="/opt/llvm-mingw/llvm-mingw-ucrt/bin/x86_64-w64-mingw32-windres"
# 验证 qemu 和 docker 安装
RUN qemu-aarch64-static --version && \
qemu-x86_64-static --version && \

View File

@ -20,6 +20,9 @@ services:
# Arch Linux Buildx 配置 - 使用 tonistiigi/binfmt
- ENABLE_BUILDX=true
- BINFMT_METHOD=tonistiigi
- GITEA_INSTANCE=https://git.mytsl.cn
- GITEA_TOKEN=
- DEFAULT_RUNNER_NAME=buildx-archlinux
- DEFAULT_RUNNER_LABEL=archlinux:host://archlinux:latest,company-server:host://archlinux:latest,buildx-archlinux:host://archlinux:latest
# 如果需要使用代理,取消下面的注释并修改为你的代理地址

View File

@ -15,12 +15,24 @@ RUN apt-get update && apt-get install -y \
lsb-release \
qemu-user-static \
binfmt-support \
apt-transport-https \
&& rm -rf /var/lib/apt/lists/*
# 安装 Docker包含 Buildx 插件)
RUN curl -fsSL https://get.docker.com -o get-docker.sh && \
sh get-docker.sh && \
rm get-docker.sh
RUN install -m 0755 -d /etc/apt/keyrings && \
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \
chmod a+r /etc/apt/keyrings/docker.gpg && \
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" > /etc/apt/sources.list.d/docker.list && \
apt-get update && \
apt-get install -y \
docker-ce \
docker-ce-cli \
containerd.io \
docker-buildx-plugin \
docker-compose-plugin \
&& rm -rf /var/lib/apt/lists/*
# 验证安装
RUN docker --version && \

View File

@ -19,7 +19,9 @@ services:
# Buildx 配置 - 启用多架构构建
- ENABLE_BUILDX=true
- BINFMT_METHOD=update-binfmts
- GITEA_INSTANCE=https://git.mytsl.cn
- GITEA_TOKEN=
- DEFAULT_RUNNER_NAME=buildx-ubuntu-22
- DEFAULT_RUNNER_LABEL=ubuntu-22.04:host://ubuntu:22.04,company-server:host://ubuntu:22.04,buildx-ubuntu-22:host://ubuntu:22.04
# 如果需要使用代理,取消下面的注释并修改为你的代理地址

View File

@ -17,6 +17,9 @@ services:
# Standard 配置 - 不启用 Buildx
- ENABLE_BUILDX=false
- GITEA_INSTANCE=https://git.mytsl.cn
- GITEA_TOKEN=
- DEFAULT_RUNNER_NAME=standard-ubuntu-22
- DEFAULT_RUNNER_LABEL=ubuntu-22.04:host://ubuntu:22.04,company-server:host://ubuntu:22.04,standard-ubuntu-22:host://ubuntu:22.04
# 如果需要使用代理,取消下面的注释并修改为你的代理地址