diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a62f8e9..9d323b8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,25 +1,22 @@ -workflow: - rules: - - if: '$CI_PIPELINE_SOURCE == "web"' - - when: never - stages: - publish variables: - DOCKER_HOST: tcp://docker:2375 - DOCKER_TLS_CERTDIR: "" - DOCKER_DRIVER: overlay2 + DOCKER_BUILDKIT: "1" DEFAULT_IMAGE_REPO: swr.cn-north-1.myhuaweicloud.com/sino-bridge/sinocode-analytics PUSH_LATEST: "true" -publish:huawei-swr: +publish_on_runner: stage: publish - image: docker:28.0.4-cli - services: - - name: docker:28.0.4-dind - command: ["--tls=false"] + tags: + - base90 + rules: + - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' + when: manual + - when: never script: + - set -eu + - docker --version - | if [ -z "${DOCKER_LOGIN_COMMAND:-}" ]; then echo "Set DOCKER_LOGIN_COMMAND when running the pipeline." diff --git a/README.md b/README.md index b71da5d..d1aba48 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,7 @@ For Coolify deployments, use `docker-compose.coolify.yml`. It expects runtime en ## GitLab Manual Publish -Run the GitLab pipeline manually and set `DOCKER_LOGIN_COMMAND` to the full Huawei Cloud SWR login command. +Run the `publish_on_runner` manual GitLab job on the default branch and set `DOCKER_LOGIN_COMMAND` to the full Huawei Cloud SWR login command. The job uses the `base90` runner. Optional variables: