name: Commitlint on: pull_request: branches: [main] concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: commitlint: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - uses: pnpm/action-setup@v2 with: version: latest - uses: actions/setup-node@v4 with: node-version: 18 cache: "pnpm" - name: Cache node modules uses: actions/cache@v3 continue-on-error: true with: path: | ~/.pnpm-store node_modules key: ${{ runner.os }}-node-${{ hashFiles('**/pnpm-lock.yaml') }} restore-keys: | ${{ runner.os }}-node- - run: pnpm install --frozen-lockfile --prefer-offline - run: pnpm dlx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose