Skip to content

Commit 2a7329d

Browse files
committed
Do not run the linter directly after reformatting
- If we do, the linter will still have the old environment, so it will be ineffective
1 parent a564adf commit 2a7329d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.github/workflows/lint.yml

+6
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,12 @@ on:
99
jobs:
1010
reformat:
1111
runs-on: ubuntu-latest
12+
outputs:
13+
reformatting-required: ${{ steps.push-back-to-repo.outputs.modified }}
1214
steps:
1315
- uses: actions/checkout@v3
16+
with:
17+
token : ${{ secrets.PAT }}
1418
- uses: actions/setup-python@v4
1519
with:
1620
python-version: '3.9'
@@ -24,10 +28,12 @@ jobs:
2428
- name: Remove commented out code
2529
run: eradicate --in-place ./**/*.py
2630
- name: Push back to repo
31+
id: push-back-to-repo
2732
uses: anyone-developer/[email protected]
2833
lint:
2934
runs-on: ubuntu-latest
3035
needs: reformat
36+
if: needs.reformat.reformatting-required == 0
3137
steps:
3238
- uses: actions/checkout@v3
3339
- uses: actions/setup-python@v4

0 commit comments

Comments
 (0)