Skip to content

Commit

Permalink
GitHubCI: add a job to check commitlint status for PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
knocte committed Sep 9, 2022
1 parent dac6be4 commit 0d54e7e
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: commitlint check

on: pull_request

jobs:
commitlint:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: 14.x
- name: Install dependencies
run: npm install
- name: Validate all commits from PR
run: >
for commit in $(git rev-list ${{ github.base_ref }}..${{
github.head_ref }}); do
npx commitlint --from $commit --to HEAD --verbose
done

0 comments on commit 0d54e7e

Please sign in to comment.