-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add conventional commits PR linter
- Loading branch information
1 parent
1af6b1e
commit 66d371b
Showing
2 changed files
with
56 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,20 @@ | ||
name: PR format test - Conventional commits | ||
|
||
on: | ||
workflow_call: | ||
pull_request: | ||
types: [opened, synchronize, edited, reopened] | ||
|
||
jobs: | ||
linter: | ||
name: Pull Request title check | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
# https://github.com/marketplace/actions/semantic-release-pr-title-check | ||
- name: Semantic Release PR Title Check | ||
uses: osl-incubator/semantic-release-pr-title-check@c67ca9c687967721b9b351970ff8c65fc5658dd8 # v1.4.3 | ||
with: | ||
convention-name: conventionalcommits |
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 |
---|---|---|
|
@@ -12,6 +12,12 @@ Please only use `main` as the version, if you want to use the latest version, as | |
|
||
## Available actions | ||
|
||
A wide range of actions are available, from Semver to linting. | ||
|
||
- [Semver release](#semver-release) | ||
- [Docker build and push](#docker-build-and-push) | ||
- [PR format test - Conventional commits](#pr-format-test---conventional-commits) | ||
|
||
### Semver release | ||
|
||
This action will run Semantic Release to determine the next version of the package and create a new release. | ||
|
@@ -144,3 +150,33 @@ Where it is located can be specified in the action. | |
with: | ||
semver: ${{ needs.release.outputs.version }} | ||
``` | ||
|
||
### PR format test - Conventional commits | ||
|
||
This action checks if the PR title fits the [Conventional commits](https://conventionalcommits.org) format. | ||
Perfect for ensuring the PR fits the Conventional commits format for [Semantic release](https://semantic-release.gitbook.io/semantic-release/). | ||
|
||
#### Pre-requisites | ||
|
||
This action requires no specific setup in the repository. | ||
|
||
#### Inputs | ||
|
||
There are not inputs for this action. | ||
|
||
#### Example usage | ||
|
||
**Usage of the action:** | ||
|
||
```yaml | ||
name: PR format test - Conventional commits | ||
on: | ||
pull_request: | ||
types: [opened, synchronize, edited, reopened] | ||
jobs: | ||
pr-linter: | ||
name: Pull Request title check | ||
uses: the0mikkel/ci/.github/workflows/[email protected] | ||
``` |