-
Notifications
You must be signed in to change notification settings - Fork 7
40 lines (35 loc) · 1.02 KB
/
auto_format_docs.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
name: Auto Format Config files & Docs
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
format:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
- if: github.event_name == 'push'
uses: actions/checkout@v2
- if: github.event_name == 'pull_request'
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: Run Black
uses: actionsx/prettier@v2
with:
# prettier CLI arguments.
args: --write "**/*.yml" "**/*.md"
- name: Commit changes
id: commit_changes
uses: peter-evans/create-pull-request@v7
with:
commit-message: format & update for python
committer: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
author: ${{ github.actor }} <${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com>
signoff: false
delete-branch: true