You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by do...@apache.org on 2022/02/27 14:34:19 UTC
[incubator-inlong] branch master updated: [INLONG-2772][CI] Fix the docker image publish error (#2773)
This is an automated email from the ASF dual-hosted git repository.
dockerzhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-inlong.git
The following commit(s) were added to refs/heads/master by this push:
new 448d4f4 [INLONG-2772][CI] Fix the docker image publish error (#2773)
448d4f4 is described below
commit 448d4f4ffccd4820a2c997b2747b842ff357fbc3
Author: Yuanhao Ji <ts...@qq.com>
AuthorDate: Sun Feb 27 22:34:14 2022 +0800
[INLONG-2772][CI] Fix the docker image publish error (#2773)
---
.github/workflows/ci_build_docker.yml | 3 ++-
docker/publish.sh | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/ci_build_docker.yml b/.github/workflows/ci_build_docker.yml
index 0e0d973..81de001 100644
--- a/.github/workflows/ci_build_docker.yml
+++ b/.github/workflows/ci_build_docker.yml
@@ -58,7 +58,8 @@ jobs:
- name: Push docker image to Docker Hub
if: ${{ success() && github.event_name == 'push' && github.ref_name == 'master' && github.repository_owner == 'apache' }}
- run: sh docker/publish.sh
+ working-directory: docker
+ run: bash +x publish.sh
env:
DOCKER_USER: ${{ secrets.DOCKER_USER }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
diff --git a/docker/publish.sh b/docker/publish.sh
index 99fed24..5ffb636 100644
--- a/docker/publish.sh
+++ b/docker/publish.sh
@@ -30,9 +30,9 @@ fi
DOCKER_ORG="${DOCKER_ORG:-inlong}"
-docker login ${DOCKER_REGISTRY} -u="$DOCKER_USER" -p="$DOCKER_PASSWORD"
+echo $DOCKER_PASSWORD | docker login ${DOCKER_REGISTRY} -u="$DOCKER_USER" --password-stdin
if [ $? -ne 0 ]; then
- echo "Failed to loging to Docker Hub"
+ echo "Failed to login to ${DOCKER_REGISTRY}"
exit 1
fi