Skip to content

Commit

Permalink
GitHubCI: fix commitlint invocation
Browse files Browse the repository at this point in the history
We now use a script in conventions repo so that the invocation
approach can be defined there (because we've had to
downgrade to a previous version and we don't want all
consumers of conventions repo to need to know about this,
they can just call this script).
  • Loading branch information
knocte committed Jan 7, 2023
1 parent 848b7b0 commit 37e374a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -319,15 +319,17 @@ jobs:
# needed because of commit-lint, see https://github.com/conventional-changelog/commitlint/issues/3376
fetch-depth: 0
- name: Install dependencies of commitlint
run: sudo apt install --yes npm && npm install @commitlint/config-conventional
run: sudo apt install --yes 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

snap_pkg:

Expand Down

0 comments on commit 37e374a

Please sign in to comment.