Skip to content

Commit 63a0dce

Browse files
Address code review feedback: add permissions, prevent infinite loops, simplify dependency install
Co-authored-by: SomethingGeneric <[email protected]>
1 parent 3c6255b commit 63a0dce

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/lint.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ jobs:
1010
pylint:
1111
name: Pylint
1212
runs-on: ubuntu-latest
13+
permissions:
14+
contents: read
1315
steps:
1416
- uses: actions/checkout@v4
1517

@@ -22,7 +24,7 @@ jobs:
2224
run: |
2325
python -m pip install --upgrade pip
2426
pip install pylint
25-
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
27+
pip install -r requirements.txt
2628
2729
- name: Run Pylint
2830
run: |
@@ -33,6 +35,8 @@ jobs:
3335
runs-on: ubuntu-latest
3436
permissions:
3537
contents: write
38+
# Skip if the last commit was from github-actions[bot] to avoid infinite loops
39+
if: github.actor != 'github-actions[bot]'
3640
steps:
3741
- uses: actions/checkout@v4
3842
with:
@@ -63,6 +67,6 @@ jobs:
6367
run: |
6468
git config user.name "github-actions[bot]"
6569
git config user.email "github-actions[bot]@users.noreply.github.com"
66-
git add -A
70+
git add .
6771
git commit -m "Apply black formatting"
6872
git push

0 commit comments

Comments
 (0)