| 1 |
name: Lint Commit Message |
| 2 |
on: |
| 3 |
pull_request: |
| 4 |
|
| 5 |
permissions: |
| 6 |
contents: read # Set default read-only permissions |
| 7 |
|
| 8 |
jobs: |
| 9 |
lint: |
| 10 |
name: Lint Commit Message |
| 11 |
runs-on: ubuntu-latest |
| 12 |
steps: |
| 13 |
- name: Harden the Runner (Step Security) |
| 14 |
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4 |
| 15 |
with: |
| 16 |
egress-policy: audit |
| 17 |
|
| 18 |
- name: Checkout Repo |
| 19 |
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 |
| 20 |
with: |
| 21 |
fetch-depth: 0 |
| 22 |
persist-credentials: false |
| 23 |
|
| 24 |
- name: Setup Bun |
| 25 |
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 |
| 26 |
with: |
| 27 |
bun-version: latest |
| 28 |
|
| 29 |
- name: Install Dependencies |
| 30 |
run: bun install --frozen-lockfile |
| 31 |
|
| 32 |
- name: Validate PR commits with commitlint |
| 33 |
run: > |
| 34 |
bunx commitlint |
| 35 |
--from ${{ github.event.pull_request.base.sha }} |
| 36 |
--to ${{ github.event.pull_request.head.sha }} |
| 37 |
--verbose |