task-supervisor/.drone.yml
seahi bdc3bb03c1
Some checks reported errors
continuous-integration/drone/push Build encountered an error
预登录构建
2025-04-18 12:48:49 +08:00

45 lines
1.0 KiB
YAML

kind: pipeline
type: docker
name: Build docker image
node:
name: pve
steps:
- name: Pre-login to Docker Hub
image: docker:cli
pull: if-not-exists
volumes:
- name: docker-config
path: /root/.docker
environment:
DOCKER_USERNAME:
from_secret: dockerhub_username
DOCKER_PASSWORD:
from_secret: dockerhub_password
commands:
- echo "Logging into Docker Hub..."
- docker login docker.io -u "$${DOCKER_USERNAME}" -p "$${DOCKER_PASSWORD}"
- cat /root/.docker/config.json # 显示配置文件内容(可选,用于调试)
- name: Build and Push
image: plugins/docker:20.10
pull: if-not-exists
volumes:
- name: docker-config
path: /root/.docker
settings:
debug: true
dockerfile: Dockerfile
auto_tag: true
registry: harbor.seahi.me
repo: harbor.seahi.me/stu/task-supervisor
username:
from_secret: harbor_username
password:
from_secret: harbor_password
volumes:
- name: docker-config
temp: {}