Compare commits
3 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
db75d0ebc5 | |
|
|
1b5611cf3e | |
|
|
44e92ab89a |
|
|
@ -621,17 +621,20 @@ jobs:
|
||||||
echo "👥 收集贡献者..."
|
echo "👥 收集贡献者..."
|
||||||
|
|
||||||
# 收集贡献者 (去除 bot)
|
# 收集贡献者 (去除 bot)
|
||||||
|
# 动态过滤配置的 bot 用户名
|
||||||
if [ "$COMMIT_RANGE" = "HEAD" ]; then
|
if [ "$COMMIT_RANGE" = "HEAD" ]; then
|
||||||
CONTRIBUTORS=$(git log --pretty=format:"%an" --no-merges | \
|
CONTRIBUTORS=$(git log --pretty=format:"%an" --no-merges | \
|
||||||
grep -v "github-actions\[bot\]" | \
|
grep -v "github-actions\[bot\]" | \
|
||||||
grep -v "dependabot\[bot\]" | \
|
grep -v "dependabot\[bot\]" | \
|
||||||
grep -v "renovate\[bot\]" | \
|
grep -v "renovate\[bot\]" | \
|
||||||
|
grep -v "^${{ env.GIT_USER_NAME }}$" | \
|
||||||
sort -u)
|
sort -u)
|
||||||
else
|
else
|
||||||
CONTRIBUTORS=$(git log $COMMIT_RANGE --pretty=format:"%an" --no-merges | \
|
CONTRIBUTORS=$(git log $COMMIT_RANGE --pretty=format:"%an" --no-merges | \
|
||||||
grep -v "github-actions\[bot\]" | \
|
grep -v "github-actions\[bot\]" | \
|
||||||
grep -v "dependabot\[bot\]" | \
|
grep -v "dependabot\[bot\]" | \
|
||||||
grep -v "renovate\[bot\]" | \
|
grep -v "renovate\[bot\]" | \
|
||||||
|
grep -v "^${{ env.GIT_USER_NAME }}$" | \
|
||||||
sort -u)
|
sort -u)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
22
CHANGELOG.md
22
CHANGELOG.md
|
|
@ -1,5 +1,27 @@
|
||||||
# CHANGELOG
|
# 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
|
## :bookmark: 0.0.3
|
||||||
|
|
||||||
### :pencil: What's Changed
|
### :pencil: What's Changed
|
||||||
|
|
|
||||||
|
|
@ -20,12 +20,17 @@ echo ""
|
||||||
|
|
||||||
# 获取注册信息并验证
|
# 获取注册信息并验证
|
||||||
while true; do
|
while true; do
|
||||||
|
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
|
read -p "Enter Gitea instance URL (e.g., https://gitea.example.com): " GITEA_INSTANCE
|
||||||
|
fi
|
||||||
|
|
||||||
# 验证 URL 格式
|
# 验证 URL 格式
|
||||||
if [[ ! "$GITEA_INSTANCE" =~ ^https?:// ]]; then
|
if [[ ! "$GITEA_INSTANCE" =~ ^https?:// ]]; then
|
||||||
echo "✗ Error: URL must start with http:// or https://"
|
echo "✗ Error: URL must start with http:// or https://"
|
||||||
echo ""
|
echo ""
|
||||||
|
unset GITEA_INSTANCE
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -35,15 +40,20 @@ while true; do
|
||||||
break
|
break
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [ -n "${GITEA_TOKEN:-}" ]; then
|
||||||
|
echo "Using registration token from env."
|
||||||
|
else
|
||||||
read -p "Enter registration token: " GITEA_TOKEN
|
read -p "Enter registration token: " GITEA_TOKEN
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -z "$GITEA_TOKEN" ]; then
|
if [ -z "$GITEA_TOKEN" ]; then
|
||||||
echo "✗ Error: Token cannot be empty!"
|
echo "✗ Error: Token cannot be empty!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
read -p "Enter runner name (default: docker-runner): " RUNNER_NAME
|
DEFAULT_NAME="${DEFAULT_RUNNER_NAME:-docker-runner}"
|
||||||
RUNNER_NAME=${RUNNER_NAME:-docker-runner}
|
read -p "Enter runner name (default: $DEFAULT_NAME): " RUNNER_NAME
|
||||||
|
RUNNER_NAME=${RUNNER_NAME:-$DEFAULT_NAME}
|
||||||
|
|
||||||
# 多个 label(逗号分隔,无空格)
|
# 多个 label(逗号分隔,无空格)
|
||||||
# ubuntu-22.04:host://ubuntu:22.04,ubuntu-20.04:host://ubuntu:20.04,node:docker://node:18
|
# ubuntu-22.04:host://ubuntu:22.04,ubuntu-20.04:host://ubuntu:20.04,node:docker://node:18
|
||||||
|
|
|
||||||
|
|
@ -23,16 +23,20 @@ RUN pacman -Syu --noconfirm && \
|
||||||
ninja \
|
ninja \
|
||||||
curl \
|
curl \
|
||||||
git \
|
git \
|
||||||
|
nodejs \
|
||||||
|
npm \
|
||||||
python \
|
python \
|
||||||
python-pyyaml \
|
python-pyyaml \
|
||||||
python-pip \
|
python-pip \
|
||||||
paru \
|
paru \
|
||||||
conan \
|
|
||||||
sudo \
|
sudo \
|
||||||
vim \
|
vim \
|
||||||
supervisor \
|
supervisor \
|
||||||
qemu-user-static \
|
qemu-user-static \
|
||||||
qemu-user-static-binfmt \
|
qemu-user-static-binfmt \
|
||||||
|
fakeroot \
|
||||||
|
docker \
|
||||||
|
docker-buildx \
|
||||||
&& pacman -Scc --noconfirm
|
&& pacman -Scc --noconfirm
|
||||||
|
|
||||||
# AUR 用户(paru 需非 root 运行)
|
# AUR 用户(paru 需非 root 运行)
|
||||||
|
|
@ -43,7 +47,7 @@ RUN useradd -m aur && \
|
||||||
# 安装额外的 AUR 工具
|
# 安装额外的 AUR 工具
|
||||||
USER aur
|
USER aur
|
||||||
WORKDIR /home/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 && \
|
paru -Scc --noconfirm && \
|
||||||
rm -rf ~/.cache/paru
|
rm -rf ~/.cache/paru
|
||||||
|
|
||||||
|
|
@ -51,6 +55,10 @@ RUN paru -S --noconfirm --needed --noprogressbar llvm-mingw-w64-toolchain-ucrt-b
|
||||||
USER root
|
USER root
|
||||||
WORKDIR /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 安装
|
# 验证 qemu 和 docker 安装
|
||||||
RUN qemu-aarch64-static --version && \
|
RUN qemu-aarch64-static --version && \
|
||||||
qemu-x86_64-static --version && \
|
qemu-x86_64-static --version && \
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,9 @@ services:
|
||||||
# Arch Linux Buildx 配置 - 使用 tonistiigi/binfmt
|
# Arch Linux Buildx 配置 - 使用 tonistiigi/binfmt
|
||||||
- ENABLE_BUILDX=true
|
- ENABLE_BUILDX=true
|
||||||
- BINFMT_METHOD=tonistiigi
|
- 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
|
- DEFAULT_RUNNER_LABEL=archlinux:host://archlinux:latest,company-server:host://archlinux:latest,buildx-archlinux:host://archlinux:latest
|
||||||
|
|
||||||
# 如果需要使用代理,取消下面的注释并修改为你的代理地址
|
# 如果需要使用代理,取消下面的注释并修改为你的代理地址
|
||||||
|
|
|
||||||
|
|
@ -15,12 +15,24 @@ RUN apt-get update && apt-get install -y \
|
||||||
lsb-release \
|
lsb-release \
|
||||||
qemu-user-static \
|
qemu-user-static \
|
||||||
binfmt-support \
|
binfmt-support \
|
||||||
|
apt-transport-https \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# 安装 Docker(包含 Buildx 插件)
|
# 安装 Docker(包含 Buildx 插件)
|
||||||
RUN curl -fsSL https://get.docker.com -o get-docker.sh && \
|
RUN install -m 0755 -d /etc/apt/keyrings && \
|
||||||
sh get-docker.sh && \
|
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \
|
||||||
rm get-docker.sh
|
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 && \
|
RUN docker --version && \
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,9 @@ services:
|
||||||
|
|
||||||
# Buildx 配置 - 启用多架构构建
|
# Buildx 配置 - 启用多架构构建
|
||||||
- ENABLE_BUILDX=true
|
- 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
|
- DEFAULT_RUNNER_LABEL=ubuntu-22.04:host://ubuntu:22.04,company-server:host://ubuntu:22.04,buildx-ubuntu-22:host://ubuntu:22.04
|
||||||
|
|
||||||
# 如果需要使用代理,取消下面的注释并修改为你的代理地址
|
# 如果需要使用代理,取消下面的注释并修改为你的代理地址
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,9 @@ services:
|
||||||
|
|
||||||
# Standard 配置 - 不启用 Buildx
|
# Standard 配置 - 不启用 Buildx
|
||||||
- ENABLE_BUILDX=false
|
- 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
|
- DEFAULT_RUNNER_LABEL=ubuntu-22.04:host://ubuntu:22.04,company-server:host://ubuntu:22.04,standard-ubuntu-22:host://ubuntu:22.04
|
||||||
|
|
||||||
# 如果需要使用代理,取消下面的注释并修改为你的代理地址
|
# 如果需要使用代理,取消下面的注释并修改为你的代理地址
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue