5
0
Fork 0
mirror of https://github.com/wagoid/commitlint-github-action.git synced 2025-11-07 08:06:54 +00:00

chore: readme.md update github actions versions (#808)

This commit is contained in:
Christian Clauss 2025-01-14 16:57:38 +01:00 committed by GitHub
parent 0184f5a228
commit ddda164162
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -4,7 +4,7 @@ Lints Pull Request commits with [commitlint](https://commitlint.js.org/).
## Usage ## Usage
Create a github workflow in the `.github` folder, e.g. `.github/workflows/commitlint.yml`: Create a GitHub workflow in the `.github` folder, e.g. `.github/workflows/commitlint.yml`:
```yaml ```yaml
name: Lint Commit Messages name: Lint Commit Messages
@ -18,11 +18,11 @@ jobs:
commitlint: commitlint:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: wagoid/commitlint-github-action@v6 - uses: wagoid/commitlint-github-action@v6
``` ```
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. 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.
### Using with GitHub Merge Queues ### Using with GitHub Merge Queues
@ -44,7 +44,7 @@ jobs:
commitlint: commitlint:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
with: with:
ref: ${{ github.sha }} ref: ${{ github.sha }}
@ -68,7 +68,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout Repository - name: Checkout Repository
uses: actions/checkout@v3 uses: actions/checkout@v4
``` ```
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**. 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:
commitlint: commitlint:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: actions/setup-node@v2 - uses: actions/setup-node@v4
with: with:
node-version: '14' node-version: '22'
- run: npm install - run: npm install
# Run the commitlint action, considering its own dependencies and yours as well 🚀 # Run the commitlint action, considering its own dependencies and yours as well 🚀
# `github.workspace` is the path to your repository. # `github.workspace` is the path to your repository.