Skip to content

Commit

Permalink
fix(github/workflows): use git rev-parse
Browse files Browse the repository at this point in the history
  • Loading branch information
cherfia committed Nov 29, 2023
1 parent e91141a commit 90995db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
yarn add commitlint@latest
- name: Validate current commit (last commit) with commitlint
if: github.event_name == 'push'
run: npx commitlint --from HEAD~1 --to HEAD --verbose --
run: npx commitlint --from $(git rev-parse HEAD~1) --to $(git rev-parse 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: npx commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose
- run: yarn
- run: yarn lint
- run: yarn build
Expand Down

0 comments on commit 90995db

Please sign in to comment.