mirror of
https://github.com/GradienceTeam/Gradience.git
synced 2024-09-29 15:07:54 +00:00
ci: add autopep8
Signed-off-by: 0xMRTT <0xMRTT@tuta.io>
This commit is contained in:
parent
d1de9d9213
commit
36212a8ca2
1 changed files with 24 additions and 0 deletions
24
.github/workflows/autopep8.yml
vendored
Normal file
24
.github/workflows/autopep8.yml
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
name: autopep8
|
||||
on: pull_request
|
||||
jobs:
|
||||
autopep8:
|
||||
# Check if the PR is not from a fork
|
||||
if: github.event.pull_request.head.repo.full_name == github.repository
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
token: ${{ secrets.ACCESS_TOKEN }}
|
||||
ref: ${{ github.head_ref }}
|
||||
- name: autopep8
|
||||
id: autopep8
|
||||
uses: peter-evans/autopep8@v1
|
||||
with:
|
||||
args: --exit-code --recursive --in-place --aggressive --aggressive .
|
||||
- name: Commit autopep8 changes
|
||||
if: steps.autopep8.outputs.exit-code == 2
|
||||
run: |
|
||||
git config --global user.name 'AdwCustomizer'
|
||||
git config --global user.email 'AdwCustomizerTeam@proton.me'
|
||||
git commit -am "lint: automated autopep8 fixes"
|
||||
git push
|
Loading…
Reference in a new issue