Skip to content

Commit

Permalink
ci: use intermediate env vars for commitlint job
Browse files Browse the repository at this point in the history
Signed-off-by: Kush Upadhyay <[email protected]>
  • Loading branch information
koooosh committed Nov 25, 2024
1 parent bffadea commit bc5fab4
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,14 @@ jobs:
- name: Install dependencies
run: npm install commitlint @commitlint/config-conventional
- name: Run commitlint against commits in PR
env:
WORKSPACE: ${{ github.workspace }}
BASE_SHA: ${{ github.event.pull_request.base.sha }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
run: |
npx commitlint \
-g ${{ github.workspace }}/.commitlint.config.mjs \
--from ${{ github.event.pull_request.base.sha }} \
--to ${{ github.event.pull_request.head.sha }} \
--help-url="https://github.com/${GITHUB_REPOSITORY}/blob/${GITHUB_BASE_REF}/CONTRIBUTING.md" \
-g "$WORKSPACE"/.commitlint.config.mjs \
--from "$BASE_SHA" \
--to "$HEAD_SHA" \
--help-url="https://github.com/"${GITHUB_REPOSITORY}"/blob/"${GITHUB_BASE_REF}"/CONTRIBUTING.md" \
--verbose

0 comments on commit bc5fab4

Please sign in to comment.