Skip to content

Commit

Permalink
no auto format code
Browse files Browse the repository at this point in the history
  • Loading branch information
Mayur Prajapati committed Sep 25, 2024
1 parent 2ab717b commit a9c03f7
Showing 1 changed file with 7 additions and 20 deletions.
27 changes: 7 additions & 20 deletions .github/workflows/run_yapf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit a9c03f7

Please sign in to comment.