Skip to content

Commit

Permalink
ci(github-actions): fix commitlint issue and add Node.js setup
Browse files Browse the repository at this point in the history
  • Loading branch information
engineering87 authored Feb 3, 2025
1 parent 5f1af23 commit 7ad3e56
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/commit-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
pull_request:
branches:
- '*' # Runs on any pull request targeting any branch

name: Lint commits
jobs:
lint-commits:
Expand All @@ -14,10 +15,12 @@ jobs:
with:
fetch-depth: 0
- name: Fixup git permissions
# https://github.com/actions/checkout/issues/766
shell: bash
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- uses: actions/setup-node@v4.1.0
- run: npm install conventional-changelog
- run: npm install @commitlint/cli
- run: npx commitlint --from HEAD~${{ github.event.pull_request.commits }} --to HEAD
with:
node-version: 20
- name: Install commitlint dependencies
run: npm install --save-dev @commitlint/cli @commitlint/config-conventional
- name: Check commit messages
run: npx commitlint --from HEAD~${{ github.event.pull_request.commits || 1 }} --to HEAD

0 comments on commit 7ad3e56

Please sign in to comment.