-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(gha): added a new action to check for commit msg compliance
- Loading branch information
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' }} |