Skip to content

Adding autopep8 Action #1

Adding autopep8 Action

Adding autopep8 Action #1

Workflow file for this run

name: autopep8
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
autopep8:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: autopep8
id: autopep8
uses: peter-evans/autopep8@v2
with:
args: --recursive --in-place --aggressive .
- name: Commit autopep8 changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: steps.autopep8.outputs.exit-code == 2
run: |
git config --global user.name 'GitHub Actions'
git config --global user.email '[email protected]'
git add .
git commit -m "autopep8: $(date +'%Y-%m-%d')"
git push