Skip to content

Commit 3b5b4d7

Browse files
committed
chore: Exclude .github directory from formatting and auto-commit actions, and remove the workflows: write permission.
1 parent a72be77 commit 3b5b4d7

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

.github/workflows/code-quality.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ on:
1818

1919
permissions:
2020
contents: write
21-
workflows: write
2221

2322
jobs:
2423
quality-check:
@@ -42,9 +41,10 @@ jobs:
4241
run: npm ci
4342

4443
# Auto-fix formatting on push to main/develop (not on PRs)
44+
# Exclude .github/ to avoid workflow permission issues
4545
- name: Format code
4646
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop')
47-
run: npx prettier --write .
47+
run: npx prettier --write . --ignore-path .prettierignore '!.github/**'
4848

4949
- name: Run ESLint
5050
run: npm run lint
@@ -54,3 +54,4 @@ jobs:
5454
uses: stefanzweifel/git-auto-commit-action@v7
5555
with:
5656
commit_message: 'style: fix code formatting [skip ci]'
57+
file_pattern: ':!.github/**'

0 commit comments

Comments
 (0)