chore(.woodpecker): 更新CI工作流中的apt源配置 为了解决Debian版本兼容性问题,将apt源从bookworm升级到trixie版本, 并优化了源配置流程以提高构建稳定性。 ```
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user