mirror of
https://github.com/logto-io/logto.git
synced 2024-12-16 20:26:19 -05:00
ae5284b1d3
* chore(deps): update pnpm to v9 * ci: fix alteration --------- Co-authored-by: Gao Sun <gao@silverhand.io>
48 lines
1.4 KiB
YAML
48 lines
1.4 KiB
YAML
name: Upload Annotations
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
pull_request:
|
|
branches: [master]
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
upload-annotations:
|
|
# avoid out of memory issue since macOS has bigger memory
|
|
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
|
|
runs-on: macos-latest
|
|
# fork repos need to opt out
|
|
if: github.event.pull_request.head.repo.full_name == github.repository
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Node and pnpm
|
|
uses: silverhand-io/actions-node-pnpm-run-steps@v4
|
|
with:
|
|
pnpm-version: 9
|
|
|
|
- name: Prepack
|
|
run: pnpm prepack
|
|
|
|
# Build connectors before running lint since some connectors rely on the generated types
|
|
- name: Build connectors
|
|
run: pnpm connectors build
|
|
|
|
- name: Lint with Report
|
|
run: pnpm -r --parallel lint:report && node .scripts/merge-eslint-reports.js
|
|
|
|
- name: Annotate Code Linting Results
|
|
uses: ataylorme/eslint-annotate-action@3.0.0
|
|
with:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Upload ESLint report
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: eslint_report.json
|
|
path: eslint_report.json
|