Skip to content

Merge pull request #44 from vincentcasseau/main #9

Merge pull request #44 from vincentcasseau/main

Merge pull request #44 from vincentcasseau/main #9

name: autopep8 formatter
on:
push:
branches:
- main
# pull_request:
# branches:
# - main
jobs:
autopep8:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install autopep8
run: pip install autopep8
- name: Run autopep8
run: |
pythonFiles=`find Fast/ -type f -not -path "*/build/*" -name "*.py"`
autopep8 --in-place --indent-size=4 --select=E101 \
$pythonFiles
- name: Commit changes
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "Apply autopep8 formatting" || true
- name: Push changes
run: git push origin ${{ github.ref }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}