Files
milti_bot/.drone.yml
Andrey K. Choi bfbaa46031
Some checks failed
continuous-integration/drone Build is failing
ci/cd prepare
2025-07-19 17:44:44 +09:00

57 lines
1.3 KiB
YAML

kind: pipeline
type: docker
name: multibot-ci
steps:
- name: install-deps
image: python:3.11-slim
commands:
- python -m venv venv
- . venv/bin/activate
- pip install --upgrade pip
- pip install -r requirements.txt
- name: lint
image: python:3.11-slim
commands:
- pip install flake8
- flake8 main.py
- name: docker-build
image: docker:dind
volumes:
- name: dockersock
path: /var/run/docker.sock
commands:
- docker build -t ${DRONE_REPO_NAME}:latest .
# # опционально, если нужен push в DockerHub
# - name: docker-push
# image: plugins/docker
# settings:
# repo: your_dockerhub_user/${DRONE_REPO_NAME}
# tags: latest
# username:
# from_secret: docker_username
# password:
# from_secret: docker_password
# # деплой на сервер по SSH (опционально)
# - name: deploy
# image: appleboy/drone-ssh
# settings:
# host: your.server.ip
# username: your_user
# key:
# from_secret: ssh_key
# script:
# - cd /path/to/multibot
# - git pull
# - docker compose down
# - docker compose up -d --build
volumes:
- name: dockersock
host:
path: /var/run/docker.sock