-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (30 loc) · 955 Bytes
/
commitlint.yaml
File metadata and controls
41 lines (30 loc) · 955 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Commit Lint
on:
push:
permissions:
contents: read
jobs:
commit-lint:
name: Commit Lint
if: ${{ github.actor != 'dependabot[bot]' }}
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout Repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
- name: Set Up Bun
uses: oven-sh/setup-bun@735343b667d3e6f658f44d0eca948eb6282f2b76
- name: Install Dependencies
run: bun i
- name: Extract Commit Message (Push)
if: ${{ github.event_name }} == 'push'
run: |
git log -1 --pretty=%B > commit_message.txt
- name: Extract Commit Message (Pull Request)
if: ${{ github.event_name }} == 'pull_request'
run: |
git show -s --format=%B > commit_message.txt
- name: Lint
run: |
COMMIT_MESSAGE=$(cat commit_message.txt)
echo "$COMMIT_MESSAGE" | bun commitlint