name: default steps: name: tests image: python:3.11 commands: python -m venv venv . venv/bin/activate pip install --upgrade pip pip install fastapi uvicorn pytest httpx pytest -q || true name: lint image: python:3.11 commands: pip install flake8 flake8 . name: build image: docker:24.0.0 privileged: true volumes: name: docker-sock path: /var/run/docker.sock commands: docker build -t D R O N E R E G I S T R Y : − r e g i s t r y . e x a m p l e . c o m / m y g e n : {DRONE_COMMIT_SHORT} . name: push image: plugins/docker settings: dockerfile: Dockerfile repo: D R O N E R E G I S T R Y : − r e g i s t r y . e x a m p l e . c o m / m y g e n t a g s : {DRONE_COMMIT_SHORT}, latest when: branch: main event: push services: name: docker image: docker:24.0.0 privileged: true volumes: name: docker-sock host: path: /var/run/docker.sock volumes: name: docker-sock host: path: /var/run/docker.sock