action-conventional-commits/README.md

31 lines
964 B
Markdown
Raw Normal View History

2020-06-11 09:05:03 +02:00
# Conventional Commits GitHub Action
2020-06-11 10:01:37 +02:00
A simple GitHub action that makes sure all commit messages are following the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0-beta.2/) specification.
2020-06-11 09:55:51 +02:00
2020-06-11 10:01:04 +02:00
![Screenshot](/docs/screenshot.png)
2020-06-11 09:57:07 +02:00
Note that, typically, you would make this check on a pre-commit hook (for example, using something like [Commitlint](https://commitlint.js.org/)), but those can easily be skipped, hence this GitHub action.
2020-06-11 09:50:04 +02:00
### Usage
2023-11-23 22:33:44 +01:00
Latest version: `v1.2.0`
2020-06-11 09:50:04 +02:00
```yml
2020-06-11 09:57:43 +02:00
name: Conventional Commits
2020-06-11 09:50:04 +02:00
on:
pull_request:
branches: [ master ]
jobs:
build:
name: Conventional Commits
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
2020-06-11 09:50:04 +02:00
2022-10-18 14:08:45 +02:00
- uses: webiny/action-conventional-commits@v1.1.0
2023-11-23 22:33:44 +01:00
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Optional, for private repositories.
allowed-commit-types: "feat,fix" # Optional, set if you want a subset of commit types to be allowed.
2020-06-11 09:50:04 +02:00
```