diff --git a/.github/workflows/build-package.yml b/.github/workflows/build-package.yml index 07a448288..78843b656 100644 --- a/.github/workflows/build-package.yml +++ b/.github/workflows/build-package.yml @@ -97,7 +97,7 @@ jobs: uploader harbor-offline-installer-latest.tgz.asc $harbor_target_bucket echo "BUILD_BUNDLE=$harbor_offline_build_bundle" >> $GITHUB_ENV - publishImage $target_branch $Harbor_Assets_Version + publishImage $target_branch $Harbor_Assets_Version "${{ secrets.DOCKER_HUB_USERNAME }}" "${{ secrets.DOCKER_HUB_PASSWORD }}" - name: Slack Notification uses: sonots/slack-notice-action@v3 diff --git a/tests/ci/build_util.sh b/tests/ci/build_util.sh index 9036c58c7..bec07d990 100644 --- a/tests/ci/build_util.sh +++ b/tests/ci/build_util.sh @@ -21,7 +21,7 @@ function publishImage { fi # rename the images with tag "dev" and push to Docker Hub docker images - docker login -u $DOCKER_HUB_USERNAME -p $DOCKER_HUB_PASSWORD + docker login -u $3 -p $4 docker images | grep goharbor | grep -v "\-base" | sed -n "s|\(goharbor/[-._a-z0-9]*\)\s*\(.*$2\).*|docker tag \1:\2 \1:$image_tag;docker push \1:$image_tag|p" | bash echo "Images are published successfully" docker images