Skip to content

Commit

Permalink
⚙️ config(ci): Refactor ci:commit-msg using GitHub event custom act…
Browse files Browse the repository at this point in the history
…ion.
  • Loading branch information
make-github-pseudonymous-again committed May 22, 2024
1 parent c55fe41 commit 2c21d0d
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions .github/workflows/ci:commit-msg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,14 @@ jobs:
- name: Install 💾
uses: ./.github/actions/install

- name: Lint last pushed commit 👕
if: github.event_name == 'push'
run: |
npm run check:commit-msg -- --last --verbose
- name: Lint PR commits 👕
if: github.event_name == 'pull_request'
run: |
npm run check:commit-msg -- --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
- name: Lint merge group commits 👕
if: github.event_name == 'merge_group'
run: |
npm run check:commit-msg -- --from ${{ github.event.merge_group.base_sha }} --to ${{ github.event.merge_group.head_sha }} --verbose
- name: Compute MERGE_BASE and HEAD_SHA 📜
id: event
uses: ./.github/actions/github/event

- name: Lint commits 👕
run: >
npm run check:commit-msg
--
--from ${{ steps.event.outputs.merge-base }}
--to ${{ steps.event.outputs.head-sha }}
--verbose

0 comments on commit 2c21d0d

Please sign in to comment.