测试1
Some checks reported errors
continuous-integration/drone/push Build encountered an error

This commit is contained in:
编码猿
2025-09-09 09:54:01 +08:00
parent 0739822ced
commit 08f072001b

View File

@@ -10,10 +10,10 @@ steps:
- name: docker-socket
path: /var/run/docker.sock
environment:
- name: APP_NAME
value: node-app
- name: CONTAINER_NAME
value: node-app-prod
SSH_PASSWORD:
APP_NAME: app_name
CONTAINER_NAME:
from_secret: container_name
commands:
# 直接在命令中设置变量避免shell解释器问题
- CURRENT_TAG=$(echo ${DRONE_COMMIT_SHA} | cut -c1-8)
@@ -34,7 +34,7 @@ steps:
# 2. 删除同前缀的旧镜像(排除当前构建标签)
- |
SAFE_APP_NAME=${APP_NAME:-"node-app-default"}
SAFE_APP_NAME=${APPNAME:-"node-app-default"}
SAFE_CURRENT_TAG=${CURRENT_TAG:-"unknown"}
echo "清理旧镜像..."
docker images --filter "reference=${SAFE_APP_NAME}:*" --format "{{.ID}} {{.Tag}}" | \