diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 017a8ed0e..cdea03744 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -3,11 +3,9 @@ name: NodeJS CI on: push: branches: [master] - pull_request: - branches: [master] permissions: - contents: read + contents: write jobs: build: @@ -33,13 +31,23 @@ jobs: - name: Lint Check if: ${{ success() }} run: | - npm run format:check + npm run lint - - name: Code Format + - name: Code Format Check + id: codeFormatCheck if: ${{ success() }} run: | npm run format:check + - name: Code Format + if: always() && steps.codeFormatCheck.outcome == 'failure' + run: | + npm run format + git config user.name "GitHub Actions Bot" + git config user.email "<>" + git commit -a -m "Code Format" + git push + - name: Security Check if: ${{ success() }} run: | diff --git a/.github/workflows/pr-checker.yml b/.github/workflows/pr-checker.yml index 48f6ba81e..e5d58b414 100644 --- a/.github/workflows/pr-checker.yml +++ b/.github/workflows/pr-checker.yml @@ -44,6 +44,14 @@ jobs: run: | npm run test:unit + - name: Lint + run: | + npm run lint + + - name: Security + run: | + npm run security:check + - name: Add Code Format Fail Comment if: always() && steps.codeFormat.outcome == 'failure' uses: thollander/actions-comment-pull-request@v1