-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
5 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,28 +16,13 @@ permissions: | |
contents: write | ||
|
||
jobs: | ||
autoyapf: | ||
formatting: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
with: | ||
ref: ${{ github.head_ref }} | ||
- name: autoyapf | ||
id: autoyapf | ||
uses: mritunjaysharma394/autoyapf@v2 | ||
with: | ||
args: --style pep8 --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 '[email protected]' | ||
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 | ||
# Run reorder-python-imports + black formatter | ||
- name: Black Code Formatter | ||
uses: tdeboissiere/python-format-action@master | ||
|
||
update-hosts: | ||
runs-on: ubuntu-latest | ||
|