tg_rss_bot/.drone.yml
Alexey Skobkin 34a96a1164
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
#36 Some renamings in .drone.yml.
2022-08-13 23:19:12 +03:00

53 lines
1.3 KiB
YAML

# https://docs.drone.io/pipeline/overview/
# https://docs.drone.io/pipeline/configuration/
kind: pipeline
type: docker
name: build
steps:
- name: build-deps
image: 'python:3-alpine'
commands:
- python -m venv .venv
- source ./.venv/bin/activate
- pip install -r requirements.txt
when:
event:
include:
- pull_request
- name: pylama
image: 'python:3-alpine'
commands:
- apk update > /dev/null && apk add git > /dev/null
#- python -m venv .venv
- source ./.venv/bin/activate
- 'pip install pylama pylama\[all\] > /dev/null'
- 'git --no-pager diff --name-only origin/${DRONE_TARGET_BRANCH} | xargs pylama'
when:
event:
include:
- pull_request
branch:
exclude: master
- name: build-docker
# https://github.com/drone/drone-plugin-index/blob/main/plugins/docker/original.md
image: plugins/docker
when:
branch:
- master
event:
- push
settings:
username:
from_secret: docker_username
password:
from_secret: docker_token
repo:
from_secret: docker_repo
tags:
- latest
# https://docs.drone.io/pipeline/environment/reference/
- ${DRONE_COMMIT_SHA:0:10}
- ${DRONE_TAG}