fix: 使用顶层 secret 方式导入配置项,规避 podman 环境变量引入问题
continuous-integration/drone/push Build is failing

This commit is contained in:
2025-12-26 17:06:49 +08:00
parent ea6c7ddfc7
commit b21e0c1382
+6 -9
View File
@@ -31,17 +31,14 @@ steps:
path: /run/podman/podman.sock
- name: containers-config
path: /etc/containers
secrets:
- source: swr_username
target: swr_username
- source: swr_password
target: swr_password
environment:
REGISTRY_SERVER: "swr.cn-north-4.myhuaweicloud.com"
REGISTRY_USER:
from_secret: swr_username
REGISTRY_PASSWORD:
from_secret: swr_password
commands:
- |
REGISTRY_USER=$(cat /run/secrets/swr_username)
REGISTRY_PASSWORD=$(cat /run/secrets/swr_password)
REGISTRY_SERVER="swr.cn-north-4.myhuaweicloud.com"
echo "Logging into registry..."
# 调试:打印所有关键变量
echo "=== Debug Variables ==="