task-supervisor/.drone.yml
seahi c4af42956b
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone Build is failing
增加Docker Hub认证信息
2025-04-18 12:25:12 +08:00

36 lines
990 B
YAML

kind: pipeline
type: docker
name: Build docker iamge
node:
name: pve
steps:
- name: Build supervisor image
pull: if-not-exists
image: plugins/docker:20.10
privileged: false
# 将 Docker Hub 凭据作为环境变量传递给插件容器
environment:
DOCKER_USERNAME:
from_secret: dockerhub_username # 引用你创建的 Secret 名称
DOCKER_PASSWORD:
from_secret: dockerhub_password # 引用你创建的 Secret 名称
settings:
login: true
dockerfile: Dockerfile
auto-tag: true
registry: docker.io
username:
from_secret: dockerhub_username
password:
from_secret: dockerhub_password
# 配置 Harbor 作为推送目标(通过额外的参数)
repo: harbor.seahi.me/stu/task-supervisor
custom_registries:
- registry: harbor.seahi.me
username:
from_secret: harbor_username
password:
from_secret: harbor_password