Skip to content

Commit

Permalink
更新 update_hosts.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
sinspired authored Dec 7, 2024
1 parent 04a7875 commit ffec2b4
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions .github/workflows/update_hosts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,28 @@ permissions:
contents: write

jobs:
lint:
autoyapf:
runs-on: ubuntu-latest
strategy:
matrix:
linter: [flake8, pylint, ruff, mypy, pytype, pyright, fixit, pyre]
steps:
- uses: advanced-security/python-lint-code-scanning-action@v1
- uses: actions/checkout@master
with:
linter: ${{ matrix.linter }}
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
update-hosts:
runs-on: ubuntu-latest
Expand Down

0 comments on commit ffec2b4

Please sign in to comment.