From 9a3518e49a5c32c0fe44a26a481e4d543f2bd677 Mon Sep 17 00:00:00 2001 From: Sinspired <63581268+sinspired@users.noreply.github.com> Date: Sat, 7 Dec 2024 09:03:45 +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 | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/update_hosts.yml b/.github/workflows/update_hosts.yml index 75f398e..9ac2b2d 100644 --- a/.github/workflows/update_hosts.yml +++ b/.github/workflows/update_hosts.yml @@ -40,10 +40,15 @@ jobs: python -m pip install --upgrade pip sudo pip install -r requirements.txt - - name: 'Run PEP8' - uses: quentinguidee/pep8-action@v1 - with: - arguments: '--max-line-length=120' + - name: Install pycodestyle + run: pip install pycodestyle + - name: Run pycodestyle + id: pycodestyle + run: | + git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep '\.py$' | xargs pycodestyle --statistics > pep8_issues.txt || true + - name: Read pycodestyle output + id: read_pep8_issues + run: echo "::set-output name=pep8_issues::$(cat pep8_issues.txt)" - name: Run hosts update script1 run: |