From 3d84ae072f480544e1919a56f4b6b3a44bbed7da Mon Sep 17 00:00:00 2001 From: Sinspired <63581268+sinspired@users.noreply.github.com> Date: Sat, 7 Dec 2024 09:44:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20update=5Fhosts.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/update_hosts.yml | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/.github/workflows/update_hosts.yml b/.github/workflows/update_hosts.yml index f8b0f24..658b306 100644 --- a/.github/workflows/update_hosts.yml +++ b/.github/workflows/update_hosts.yml @@ -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 '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 + # Run reorder-python-imports + black formatter + - name: Black Code Formatter + uses: tdeboissiere/python-format-action@master update-hosts: runs-on: ubuntu-latest