Skip to content

Commit b31244f

Browse files
Added conditional stages
1 parent b501c42 commit b31244f

File tree

1 file changed

+5
-15
lines changed

1 file changed

+5
-15
lines changed

.github/workflows/lint.yaml

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Prettier Formatting Check & Fix
1+
name: Prettier Formatting Check
22

33
on:
44
push:
@@ -36,18 +36,8 @@ jobs:
3636
id: check_format
3737
run: |
3838
npm run lint-prettier:check
39-
continue-on-error: true # Allows the workflow to continue even if this step fails
4039
41-
- name: Fix code formatting with Prettier
42-
if: steps.check_format.outcome == 'failure' # Run only if check_format failed
43-
run: |
44-
npm run lint-prettier:fix
45-
46-
- name: Commit changes if Prettier fixed formatting
47-
if: steps.check_format.outcome == 'failure' # Run only if check_format failed
48-
run: |
49-
git config --global user.name "github-actions"
50-
git config --global user.email "github-actions@github.com"
51-
git add .
52-
git commit -m "fix: apply Prettier formatting" || echo "No changes to commit"
53-
git push
40+
# - name: Fix code formatting with Prettier
41+
# if: steps.check_format.outcome == 'failure' # Run only if check_format failed
42+
# run: |
43+
# npm run lint-prettier:fix

0 commit comments

Comments
 (0)