Skip to content

Commit daaa447

Browse files
committed
test
1 parent eeb8d86 commit daaa447

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

.github/workflows/lint.yml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,24 +21,20 @@ jobs:
2121
- name: Install project dependencies
2222
run: yarn install
2323
- name: Lint
24+
id: lint
2425
run: yarn nx format:check --all
2526
continue-on-error: true # Continue even if the check fails
27+
2628
- name: Check Lint Results
27-
id: lint_result_check
28-
run: |
29-
if [ $? -ne 0 ]; then
30-
echo "Linting failed, setting output..."
31-
echo "::set-output name=lint_failed::true"
32-
else
33-
echo "::set-output name=lint_failed::false"
34-
fi
29+
if: steps.lint.outcome == 'failure'
30+
run: echo "lint_failed=true" >> $GITHUB_OUTPUT
3531

3632
- name: Auto-format and commit changes if needed
37-
if: ${{ steps.lint_result_check.outputs.lint_failed == 'true' }}
33+
if: steps.lint.outcome == 'failure'
3834
run: |
3935
yarn nx format:write --all
4036
git config --global user.name "GitHub Actions"
4137
git config --global user.email "[email protected]"
4238
git add .
43-
git commit -m "fmt"
44-
git push
39+
git commit -m "Auto-format code" || echo "No changes to commit"
40+
git push || echo "No changes to push"

0 commit comments

Comments
 (0)