From d37e5d6d3229ea668eecdaab34b5aa75ff7a5079 Mon Sep 17 00:00:00 2001 From: qxa Date: Wed, 31 Dec 2025 15:05:17 +0800 Subject: [PATCH] 1 --- entrypoint.sh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index ed30ddd..c1a74df 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -4,12 +4,8 @@ export DOCKER_API_VERSION=1.41 docker -v if [ -n "$INPUT_USERNAME" ]; then - # echo "$INPUT_PASSWORD" | docker login $INPUT_REGISTRY -u $INPUT_USERNAME --password-stdin - echo "docker login $INPUT_REGISTRY -u $INPUT_USERNAME -p $INPUT_PASSWORD">1.txt - cat 1.txt - docker login $INPUT_REGISTRY -u $INPUT_USERNAME -p $INPUT_PASSWORD - ls ~ -R -al - cat ~/.docker/config.json + echo "$INPUT_PASSWORD" | docker login $INPUT_REGISTRY -u $INPUT_USERNAME --password-stdin + if [ ! -f ~/.docker/config.json ] || ! cat ~/.docker/config.json | grep -q "$INPUT_REGISTRY"; then echo "登录失败" exit 1