Skip to content

Commit

Permalink
feat(gha): added a new action to check for commit msg compliance
Browse files Browse the repository at this point in the history
  • Loading branch information
shinybrar committed Nov 25, 2024
1 parent 0b7c246 commit 47b0419
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/ci.commit.check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: "CI: Commit Check"

on:
pull_request:
branches: [main]
# This check runs on every push to repository
push:
branches: [main]

jobs:
commit-check:
runs-on: ubuntu-latest
permissions: # use permissions because of use pr-comments
contents: read
pull-requests: write
steps:
- uses: actions/[email protected]
with:
ref: ${{ github.event.pull_request.head.sha }} # checkout PR HEAD commit
fetch-depth: 0 # required for merge-base check
- uses: commit-check/commit-check-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # use GITHUB_TOKEN because of use pr-comments
with:
# Conventional Commits Check
message: true
# Convention Branch Check
branch: false
author-name: true
author-email: true
commit-signoff: false
merge-base: true
job-summary: true
pr-comments: ${{ github.event_name == 'pull_request' }}

0 comments on commit 47b0419

Please sign in to comment.