Skip to content

Commit

Permalink
ci: Install commitlint locally, not globally
Browse files Browse the repository at this point in the history
Global installations don't work since the release of version v19.0.0:
conventional-changelog/commitlint#3936
  • Loading branch information
MoritzWeber0 committed Feb 27, 2024
1 parent 6af1ddb commit d0821e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/commits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
with:
fetch-depth: 0
- name: Install commitlint
run: npm install -g @commitlint/cli @commitlint/config-conventional
run: npm install @commitlint/cli @commitlint/config-conventional
- name: Validate commit messages
id: conventional-commits
env:
Expand All @@ -25,7 +25,7 @@ jobs:
delim="_EOF_$(uuidgen)"
echo "validation-result<<$delim" >> "$GITHUB_OUTPUT"
r=0
commitlint --from "$SHA_FROM" --to "$SHA_TO" >> "$GITHUB_OUTPUT" 2>&1 || r=$?
npx commitlint --from "$SHA_FROM" --to "$SHA_TO" >> "$GITHUB_OUTPUT" 2>&1 || r=$?
echo "$delim" >> "$GITHUB_OUTPUT"
exit $r
- name: Post comment if validation failed
Expand Down

0 comments on commit d0821e8

Please sign in to comment.