You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-8
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ Lints Pull Request commits with [commitlint](https://commitlint.js.org/).
4
4
5
5
## Usage
6
6
7
-
Create a github workflow in the `.github` folder, e.g. `.github/workflows/commitlint.yml`:
7
+
Create a GitHub workflow in the `.github` folder, e.g. `.github/workflows/commitlint.yml`:
8
8
9
9
```yaml
10
10
name: Lint Commit Messages
@@ -18,11 +18,11 @@ jobs:
18
18
commitlint:
19
19
runs-on: ubuntu-latest
20
20
steps:
21
-
- uses: actions/checkout@v3
21
+
- uses: actions/checkout@v4
22
22
- uses: wagoid/commitlint-github-action@v6
23
23
```
24
24
25
-
Alternatively, you can run on other event types such as `on: [push]`. In that case the action will lint the push event's commit(s) instead of linting commits from a pull request. You can also combine `push` and `pull_request` together in the same workflow.
25
+
Alternatively, you can run on other event types such as `on: [push]`. In that case, the action will lint the push event's commit(s) instead of linting commits from a pull request. You can also combine `push` and `pull_request` together in the same workflow.
26
26
27
27
### Using with GitHub Merge Queues
28
28
@@ -44,7 +44,7 @@ jobs:
44
44
commitlint:
45
45
runs-on: ubuntu-latest
46
46
steps:
47
-
- uses: actions/checkout@v3
47
+
- uses: actions/checkout@v4
48
48
with:
49
49
ref: ${{ github.sha }}
50
50
@@ -68,7 +68,7 @@ jobs:
68
68
runs-on: ubuntu-latest
69
69
steps:
70
70
- name: Checkout Repository
71
-
uses: actions/checkout@v3
71
+
uses: actions/checkout@v4
72
72
```
73
73
74
74
This workflow can also be a meaningful one that checks out the commits in your PR and runs other checks, but it must have a job named **commitlint**.
@@ -204,10 +204,10 @@ jobs:
204
204
commitlint:
205
205
runs-on: ubuntu-latest
206
206
steps:
207
-
- uses: actions/checkout@v3
208
-
- uses: actions/setup-node@v2
207
+
- uses: actions/checkout@v4
208
+
- uses: actions/setup-node@v4
209
209
with:
210
-
node-version: '14'
210
+
node-version: '22'
211
211
- run: npm install
212
212
# Run the commitlint action, considering its own dependencies and yours as well 🚀
213
213
# `github.workspace` is the path to your repository.
0 commit comments