Skip to content

Commit

Permalink
CI: fix commitlint
Browse files Browse the repository at this point in the history
  • Loading branch information
aarani authored and knocte committed Apr 11, 2023
1 parent 4a052d0 commit 25002c6
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,19 @@ jobs:
git diff --exit-code
- name: Install dependencies of commitlint
run: sudo apt install --yes npm && npm install @commitlint/config-conventional
run: |
sudo apt update
sudo apt install --yes git npm
- name: Pull our commitlint configuration
run: sudo apt install wget && wget https://raw.githubusercontent.com/nblockchain/conventions/master/commitlint.config.ts
run: |
git clone https://github.com/nblockchain/conventions.git
rm -rf ./conventions/.git/
- name: Validate current commit (last commit) with commitlint
if: github.event_name == 'push'
run: npx commitlint --from HEAD~1 --to HEAD --verbose
run: ./conventions/commitlint.sh --from HEAD~1 --to HEAD --verbose
- name: Validate PR commits with commitlint
if: github.event_name == 'pull_request'
run: npx commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose
run: ./conventions/commitlint.sh --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose

package:
name: Package (Nuget)
Expand Down

0 comments on commit 25002c6

Please sign in to comment.