0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00
logto/.github/workflows/commitlint.yml

34 lines
902 B
YAML
Raw Permalink Normal View History

2021-08-02 11:18:22 -05:00
name: Commitlint
2021-08-25 10:36:11 -05:00
on:
push:
branches:
- 'push-action/**'
2021-08-25 10:36:11 -05:00
pull_request:
types: [opened, edited, synchronize, reopened]
2021-08-02 11:18:22 -05:00
concurrency:
2023-01-18 22:22:17 -05:00
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
2021-08-02 11:18:22 -05:00
jobs:
lint-commits:
if: github.event_name == 'pull_request'
2021-08-02 11:18:22 -05:00
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
2021-08-02 11:18:22 -05:00
with:
fetch-depth: 0
- name: Setup Node and pnpm
uses: silverhand-io/actions-node-pnpm-run-steps@v5
with:
pnpm-version: 9
2021-08-02 11:18:22 -05:00
- name: Commitlint
2024-03-21 10:10:24 -05:00
# Credit to https://stackoverflow.com/a/67365254/12514940
run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
2021-08-25 10:36:11 -05:00
- name: Commitlint on PR title
run: echo '${{ github.event.pull_request.title }}' | npx commitlint