Skip to content

Commit

Permalink
ci: add commitlint linting to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
garryod committed Oct 31, 2024
1 parent 42556ca commit 4d833d7
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/_lint_commits.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Lint Commits

on:
workflow_call:

jobs:
lint_commits:
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
5 changes: 5 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ on:
pull_request:

jobs:
lint_commits:
# 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
uses: ./.github/workflows/_lint_commits.yaml

helm_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
Expand Down

0 comments on commit 4d833d7

Please sign in to comment.