automated_api/.drone.yml
lixin 6a04d0a46f
Some checks failed
continuous-integration/drone/push Build is failing
ci: 更新 .drone.yml 文件
- 在文件开头添加注释#c
- 移除多余的空行
2025-01-10 13:25:28 +08:00

36 lines
801 B
YAML

kind: pipeline
type: docker
name: nodejs-22-docker-ci
#c
steps:
- name: git-clone
image: alpine/git
commands:
- git clone http://120.48.5.80:3000/lixin/automated_api.git
- cd automated_api
- name: build-docker-image
image: docker:latest
volumes:
- name: docker-socket
path: /var/run/docker.sock
working_directory: automated_api
commands:
- docker build -t rz/automated_api:latest -f Dockerfile .
- name: run-container
image: docker:latest
volumes:
- name: docker-socket
path: /var/run/docker.sock
commands:
- echo "Checking Docker version"
- docker version
- echo "Running container"
- docker run -d -p 8001:8001 rz/automated_api:latest
trigger:
branch:
- main
event:
- push