Skip to content

Commit

Permalink
ci: add commitlint to enforce conventional commits
Browse files Browse the repository at this point in the history
  • Loading branch information
garryod committed Jan 10, 2025
1 parent 2b8e483 commit f461ca2
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/_commit_lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Lint Commits

on:
workflow_call:

jobs:
lint:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
steps:
- name: Checkout Source
uses: actions/[email protected]
with:
fetch-depth: 0

- name: Lint Commits
uses: wagoid/[email protected]
with:
failOnWarnings: true
8 changes: 8 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ on:
pull_request:

jobs:
commit_lint:
# Deduplicate jobs from pull requests and branch pushes within the same repo.
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
permissions:
contents: read
pull-requests: read
uses: ./.github/workflows/_commit_lint.yaml

devcontainer:
# Deduplicate jobs from pull requests and branch pushes within the same repo.
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
Expand Down

0 comments on commit f461ca2

Please sign in to comment.