mirror of
https://github.com/wagoid/commitlint-github-action.git
synced 2025-11-07 08:06:54 +00:00
docs: explain how to use custom configs and plugins
This commit is contained in:
parent
895d9f3f73
commit
a2c9157742
1 changed files with 33 additions and 1 deletions
34
README.md
34
README.md
|
|
@ -65,4 +65,36 @@ This is a [`Docker` action](https://github.com/actions/toolkit/blob/e2adf403d6d1
|
||||||
- [conventional-changelog-lint-config-canonical](https://github.com/gajus/conventional-changelog-lint-config-canonical)
|
- [conventional-changelog-lint-config-canonical](https://github.com/gajus/conventional-changelog-lint-config-canonical)
|
||||||
- [commitlint-config-jira](https://github.com/Gherciu/commitlint-jira)
|
- [commitlint-config-jira](https://github.com/Gherciu/commitlint-jira)
|
||||||
|
|
||||||
If you have a custom shared config that lies in a private registry, let us know! We will be happy to cover this case if necessary.
|
Apart from the shared configurations that are included by default, you can also include extra dependencies for other configs and plugins that you want to use.
|
||||||
|
|
||||||
|
In order to do so, you can use `NODE_PATH` env var to make the action take those dependencies into account. Below is an example workflow that does that.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
name: Commitlint
|
||||||
|
on: [pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: '10.x'
|
||||||
|
- run: npm install
|
||||||
|
- name: Add dependencies for commitlint action
|
||||||
|
# $GITHUB_WORKSPACE is the path to your repository
|
||||||
|
run: echo "::set-env name=NODE_PATH::$GITHUB_WORKSPACE/node_modules"
|
||||||
|
# Now the commitlint action will run considering its own dependencies and yours as well 🚀
|
||||||
|
- uses: wagoid/commitlint-github-action@v1
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
💡 You can see other ways to install your dependencies (including private ones) in [the Setup Node action's docs](https://github.com/actions/setup-node).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue