Add .drone.yml
Some checks reported errors
continuous-integration/drone/push Build encountered an error
Some checks reported errors
continuous-integration/drone/push Build encountered an error
This commit is contained in:
parent
448433439f
commit
ea20e98943
1 changed files with 94 additions and 0 deletions
94
.drone.yml
Normal file
94
.drone.yml
Normal file
|
@ -0,0 +1,94 @@
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: Lint on PR
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
event:
|
||||||
|
- pull_request
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: lint_docker_compose
|
||||||
|
image: python:3.8-slim-bullseye
|
||||||
|
commands:
|
||||||
|
- "pip3 install yamllint"
|
||||||
|
- "yamllint --version"
|
||||||
|
- 'yamllint -d "{extends: relaxed, rules: {line-length: {max: 120}}}" ./*.yml'
|
||||||
|
|
||||||
|
- name: python3.8
|
||||||
|
image: python:3.8-slim-bullseye
|
||||||
|
commands:
|
||||||
|
- "python3 --version"
|
||||||
|
- "pip3 install yamllint"
|
||||||
|
- "yamllint --version"
|
||||||
|
- 'yamllint -d "{extends: relaxed, rules: {line-length: {max: 120}}}" .'
|
||||||
|
|
||||||
|
- name: python3.9
|
||||||
|
image: python:3.9-slim-bullseye
|
||||||
|
commands:
|
||||||
|
- "python3 --version"
|
||||||
|
- "pip3 install yamllint"
|
||||||
|
- "yamllint --version"
|
||||||
|
- 'yamllint -d "{extends: relaxed, rules: {line-length: {max: 120}}}" .'
|
||||||
|
|
||||||
|
- name: python3.10
|
||||||
|
image: python:3.10-slim-bullseye
|
||||||
|
commands:
|
||||||
|
- "python3 --version"
|
||||||
|
- "pip3 install yamllint"
|
||||||
|
- "yamllint --version"
|
||||||
|
- 'yamllint -d "{extends: relaxed, rules: {line-length: {max: 120}}}" .'
|
||||||
|
|
||||||
|
# Add conditional steps for specific directories here
|
||||||
|
- name: lint_arrs_directory
|
||||||
|
image: python:3.8-slim-bullseye
|
||||||
|
commands:
|
||||||
|
- "pip3 install yamllint"
|
||||||
|
- "yamllint --version"
|
||||||
|
- 'yamllint -d "{extends: relaxed, rules: {line-length: {max: 120}}}" ./arr/*.yml'
|
||||||
|
when:
|
||||||
|
condition:
|
||||||
|
- change_match:
|
||||||
|
path:
|
||||||
|
- "^arrs/.*\.yml$"
|
||||||
|
|
||||||
|
- name: lint_downloaders_directory
|
||||||
|
image: python:3.8-slim-bullseye
|
||||||
|
commands:
|
||||||
|
- "pip3 install yamllint"
|
||||||
|
- "yamllint --version"
|
||||||
|
- 'yamllint -d "{extends: relaxed, rules: {line-length: {max: 120}}}" ./downloaders/*.yml'
|
||||||
|
when:
|
||||||
|
condition:
|
||||||
|
- change_match:
|
||||||
|
path:
|
||||||
|
- "^downloaders/.*\.yml$"
|
||||||
|
---
|
||||||
|
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: Update Branches
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
event:
|
||||||
|
- push
|
||||||
|
branch:
|
||||||
|
- main
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Update arrs branch
|
||||||
|
image: plugins/git
|
||||||
|
settings:
|
||||||
|
branch: arrs
|
||||||
|
base: main
|
||||||
|
commit: ${DRONE_COMMIT_SHA}
|
||||||
|
paths:
|
||||||
|
- arrs/*
|
||||||
|
|
||||||
|
- name: Update downloaders branch
|
||||||
|
image: plugins/git
|
||||||
|
settings:
|
||||||
|
branch: downloaders
|
||||||
|
base: main
|
||||||
|
commit: ${DRONE_COMMIT_SHA}
|
||||||
|
paths:
|
||||||
|
- downloaders/*
|
Reference in a new issue