tg_rss_bot/.drone.yml

52 lines
1.3 KiB
YAML
Raw Normal View History

2022-05-02 13:53:19 +00:00
# https://docs.drone.io/pipeline/overview/
# https://docs.drone.io/pipeline/configuration/
2022-05-02 00:03:00 +00:00
kind: pipeline
2022-05-02 13:53:19 +00:00
type: docker
name: build
2022-05-02 00:03:00 +00:00
steps:
- name: build-deps
image: 'python:3-alpine'
2022-05-02 00:03:00 +00:00
commands:
- python -m venv .venv
- source ./.venv/bin/activate
- pip install -r requirements.txt
when:
event:
include:
- pull_request
2022-05-02 13:53:19 +00:00
- name: pylama
image: 'python:3-alpine'
2022-05-02 13:53:19 +00:00
commands:
- apk update > /dev/null && apk add git > /dev/null
#- python -m venv .venv
2022-05-02 13:53:19 +00:00
- source ./.venv/bin/activate
- 'pip install pylama pylama\[all\] > /dev/null'
- 'git --no-pager diff --name-only origin/${DRONE_TARGET_BRANCH} | xargs pylama'
2022-05-02 13:53:19 +00:00
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}