-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
54 lines (45 loc) · 1.18 KB
/
.drone.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
kind: pipeline
name: Format Python code, etc.
trigger:
branch:
- master
steps:
- name: Checkout dev branch instead of default branch
image: python
commands:
- git checkout master
- name: Print the git status
image: python
commands:
- git status
- echo "Current commit is $(git log --pretty=format:'%h' -n 1)"
- name: Format code if required
image: python
commands:
- python -m pip install black
- black .
- git diff --quiet && git diff --staged --quiet || git commit -am '[DRONE] [CI SKIP] Formatted code'
- git push --set-upstream origin master
---
kind: pipeline
name: Update main bastion tools when pushing to release
trigger:
branch:
- dev
steps:
- name: Checkout dev branch instead of default branch
image: python
commands:
- git checkout dev
- name: Print the git status
image: python
commands:
- git status
- echo "Current commit is $(git log --pretty=format:'%h' -n 1)"
- name: Format code if required
image: python
commands:
- python -m pip install black
- black .
- git diff --quiet && git diff --staged --quiet || git commit -am '[DRONE] [CI SKIP] Formatted code'
- git push --set-upstream origin master