.drone.yml 598 B

123456789101112131415161718192021222324252627
  1. kind: pipeline
  2. type: docker
  3. name: default
  4. # 关键:替换默认 clone 镜像
  5. clone:
  6. image: registry.cn-hangzhou.aliyuncs.com/zhongpengqun/wanderer:linux-amd64-git-v2.52.0
  7. # 触发条件
  8. trigger:
  9. branch:
  10. - master # 只在 main 分支触发
  11. event:
  12. - push # 只在 push 时触发
  13. steps:
  14. - name: hello
  15. image: alpine
  16. commands:
  17. - echo "hello world"
  18. - echo "当前分支:$DRONE_BRANCH"
  19. - echo "提交信息:$DRONE_COMMIT_MESSAGE"
  20. - name: pylint
  21. image: python:3.9
  22. commands:
  23. - pip install pylint
  24. - pylint your_project_name