ci(workflows): 更新docker.yml中的apt-get命令参数
Some checks failed
Build docker and publish / build (20.15.1) (push) Failing after 27s

移除--allow-insecure-repositories选项以增强安全性
This commit is contained in:
shanshanzhong 2025-10-22 06:31:59 -07:00
parent bc2856a23e
commit 184f9103a4
2 changed files with 25 additions and 2 deletions

View File

@ -92,8 +92,8 @@ jobs:
fi
echo "仍在等待锁释放..."; sleep 5
done
apt-get update -y -o Dpkg::Lock::Timeout=600 --allow-unauthenticated --allow-insecure-repositories --allow-downgrades
apt-get install -y -o Dpkg::Lock::Timeout=600 --allow-unauthenticated --allow-insecure-repositories --allow-downgrades --force-yes jq curl ca-certificates docker.io
apt-get update -y -o Dpkg::Lock::Timeout=600 --allow-unauthenticated --allow-downgrades
apt-get install -y -o Dpkg::Lock::Timeout=600 --allow-unauthenticated --allow-downgrades --force-yes jq curl ca-certificates docker.io
docker --version
jq --version
curl --version

23
push.sh Normal file
View File

@ -0,0 +1,23 @@
#!/bin/bash
# build-and-push.sh
set -e
# cd /Users/Apple/code2025/server
cd /Users/Apple/vpn/ppanel-server
# 固定版本号为latest
VERSION=latest
# 构建镜像
echo "Building image with version: $VERSION"
docker build -f Dockerfile --platform linux/amd64 --build-arg TARGETARCH=amd64 -t registry.kxsw.us/ppanel/ppanel-server:$VERSION .
docker tag registry.kxsw.us/ppanel/ppanel-server:$VERSION registry.kxsw.us/ppanel/ppanel-server:latest
# 推送镜像
echo "Pushing image to registry.kxsw.us"
docker push registry.kxsw.us/ppanel/ppanel-server:$VERSION
docker push registry.kxsw.us/ppanel/ppanel-server:latest
echo "Build and push completed successfully!"
# docker-compose exec certbot certbot certonly --webroot --webroot-path=/etc/letsencrypt -d api-dev.kxsw.us