```
Some checks failed
ci/woodpecker/push/my-first-workflow Pipeline failed

chore(.woodpecker): 更新CI工作流中的apt源配置

为了解决Debian版本兼容性问题,将apt源从bookworm升级到trixie版本,
并优化了源配置流程以提高构建稳定性。
```
This commit is contained in:
昔念
2026-03-19 15:22:30 +08:00
parent 90e0e2d594
commit 164e0d1437

View File

@@ -77,14 +77,21 @@ steps:
GO111MODULE: on
GOSUMDB: off
commands:
# 1. 备份原有源可选
- cp /etc/apt/sources.list /etc/apt/sources.list.bak
# 2. 清空主源文件关键先删空再写入
- >
echo "deb http://mirrors.aliyun.com/debian/ bookworm main contrib non-free non-free-firmware
deb http://mirrors.aliyun.com/debian/ bookworm-updates main contrib non-free non-free-firmware
deb http://mirrors.aliyun.com/debian-security/ bookworm-security main contrib non-free non-free-firmware" > /etc/apt/sources.list
# 1. 更新源 apt-get 消除 CLI 不稳定警告适配 CI
- apt-get update -y
# 2. 安装正确的 upx Debian 中包名是 upx-ucl不是 upx
echo "" > /etc/apt/sources.list
# 3. 写入阿里云trixie源匹配golang:1.25的系统版本避免版本混跑
- >
echo "deb http://mirrors.aliyun.com/debian/ trixie main contrib non-free non-free-firmware
deb http://mirrors.aliyun.com/debian/ trixie-updates main contrib non-free non-free-firmware
deb http://mirrors.aliyun.com/debian-security/ trixie-security main contrib non-free non-free-firmware" > /etc/apt/sources.list
# 4. 删除sources.list.d下的所有额外源彻底杜绝官方源
- rm -rf /etc/apt/sources.list.d/*
# 5. 强制更新加超时和缓存清理解决卡住问题
- apt-get clean && apt-get update -y -o Acquire::Timeout=30
# 2. 安装正确的 upx Debian 中包名是 upx-ucl不是 upx
- apt-get install -y upx-ucl
- cd blazing