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