Chore/update lint build #7086
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Lint | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- ".github/workflows/lint.yml" | |
- "docs/**" | |
- "packages/**" | |
pull_request: | |
paths: | |
- ".github/workflows/lint.yml" | |
- "docs/**" | |
- "packages/**" | |
workflow_dispatch: | |
concurrency: | |
group: ${{github.workflow}}-${{github.ref}} | |
cancel-in-progress: true | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
- uses: ./.github/actions/setup-env | |
- name: Install | |
run: pnpm install --frozen-lockfile --prefer-offline | |
- name: Build | |
run: pnpm build | |
- name: lint | |
run: pnpm lint | |
- name: Check dependency versions | |
run: node scripts/check-dependencies.js | |
- name: Install website | |
working-directory: docs/ | |
run: pnpm install --frozen-lockfile --prefer-offline | |
- name: Lint website | |
working-directory: docs/ | |
run: pnpm lint | |
comment: | |
needs: [lint] | |
if: failure() && github.event_name == 'pull_request_target' && needs.lint.result == 'failure' | |
name: Comment | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: write | |
steps: | |
- uses: actions/github-script@v7 | |
name: Comment on failure | |
with: | |
script: | | |
github.rest.issues.createComment({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: "Thanks for submitting this PR!\n\nUnfortunately, it has some linter errors, so we can't merge it yet. Can you please fix them?\n\nRunning pnpm lint:fix in the root of the repository may fix them automatically." | |
}) |