diff --git a/.github/workflows/run_yapf.yml b/.github/workflows/run_yapf.yml index 04c8530..3305608 100644 --- a/.github/workflows/run_yapf.yml +++ b/.github/workflows/run_yapf.yml @@ -3,25 +3,12 @@ name: YAPF Formatting Check on: [push] jobs: - autoyapf: + formatting-check: + name: Formatting Check runs-on: ubuntu-latest steps: - - uses: actions/checkout@master - with: - ref: ${{ github.head_ref }} - - name: autoyapf - id: autoyapf - uses: mritunjaysharma394/autoyapf@v2 - with: - args: --recursive --in-place . - - name: Check for modified files - id: git-check - run: echo ::set-output name=modified::$(if git diff-index --quiet HEAD --; then echo "false"; else echo "true"; fi) - - name: Push changes - if: steps.git-check.outputs.modified == 'true' - run: | - git config --global user.name 'github-actions' - git config --global user.email 'github-actions@github.com' - git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} - git commit -am "Automated autoyapf fixes" - git push + - uses: actions/checkout@v2 + - name: run YAPF + uses: AlexanderMelde/yapf-action@master + with: + args: --verbose