forked from 3rd-party-integrations/github-team-sync
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (37 loc) · 961 Bytes
/
black.yml
File metadata and controls
43 lines (37 loc) · 961 Bytes
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
name: Code Formatting
on:
push:
branches-ignore:
- main
pull_request:
types:
- opened
- ready_for_review
- reopened
jobs:
ci:
runs-on: 'ubuntu-latest'
name: PR Formatter
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Install python
uses: actions/setup-python@v3
with:
python-version: '3.9'
- name: Setup Python Dependencies
run: |
sudo apt-get -y install python3-pip
sudo pip3 install pipenv
pipenv install --dev
- name: Format the code
run: |
pipenv run black . --check --diff
- name: Check-in updated code
uses: EndBug/add-and-commit@v9
with:
default_author: github_actions
committer_name: GitHub Actions
committer_email: actions@github.com
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}