Skip to content

Commit d4e8c66

Browse files
committed
feat: support job summary
1 parent 14d9491 commit d4e8c66

File tree

2 files changed

+18
-11
lines changed

2 files changed

+18
-11
lines changed

.github/workflows/commit-check.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,16 @@ on:
44
push:
55
pull_request:
66
branches: 'main'
7-
workflow_dispatch:
87

98
jobs:
109
commit-check:
1110
runs-on: ubuntu-latest
1211
steps:
1312
- uses: actions/checkout@v3
14-
- uses: commit-check/commit-check-action@feature/add-summary
13+
- uses: commit-check/commit-check-action@v1
1514
with:
1615
message: true
1716
branch: true
1817
author-name: true
1918
author-email: true
20-
summary: false
21-
19+
summary: true

README.md

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ Create a new GitHub Actions workflow in your project, e.g. at [.github/workflows
1212
```yaml
1313
name: Commit Check
1414

15-
on: pull_request
15+
on:
16+
push:
17+
pull_request:
18+
branches: 'main'
1619

1720
jobs:
1821
commit-check:
@@ -26,20 +29,21 @@ jobs:
2629
author-name: true
2730
author-email: true
2831
dry-run: true
32+
summary: true
2933
```
3034
3135
## Optional Inputs
3236
3337
### `message`
3438

35-
- **Description**: check commit message formatting convention
36-
- By default the rule follows [conventionalcommits](https://www.conventionalcommits.org/)
39+
- **Description**: check commit message formatting convention.
40+
- By default the rule follows [conventionalcommits](https://www.conventionalcommits.org/).
3741
- Default: 'true'
3842

3943
### `branch`
4044

41-
- **Description**: check git branch naming convention
42-
- By default follow bitbucket [branching model](https://support.atlassian.com/bitbucket-cloud/docs/configure-a-projects-branching-model/)
45+
- **Description**: check git branch naming convention.
46+
- By default follow bitbucket [branching model](https://support.atlassian.com/bitbucket-cloud/docs/configure-a-projects-branching-model/).
4347
- Default: 'true'
4448

4549
### `author-name`
@@ -54,10 +58,15 @@ jobs:
5458

5559
### `dry-run`
5660

57-
- **Description**: run checks without failing
61+
- **Description**: run checks without failing. exit code is 0 otherwise is 1.
5862
- Default: 'false'
5963

60-
Note: to change the default rules of above inputs, just add your own [`.commit-check.yml`](.commit-check.yml) config file.
64+
### `summary`
65+
66+
- **Description**: display job summary to a workflow run
67+
- Default: 'true'
68+
69+
Note: the default rule of above inputs is following [this configuration](https://github.com/commit-check/commit-check/blob/main/.commit-check.yml), if you want to customize just add your `.commit-check.yml` config file under your repository root directory.
6170

6271
## Badging your repository
6372

0 commit comments

Comments
 (0)