Skip to content

Commit 603658d

Browse files
committed
ci: fix
1 parent 1c9feb9 commit 603658d

3 files changed

Lines changed: 19 additions & 17 deletions

File tree

.github/workflows/ci.yml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
name: CI
22

3-
on: [pull_request]
3+
on:
4+
push:
5+
branches:
6+
- '*' # matches every branch that doesn't contain a '/'
7+
- '*/*' # matches every branch containing a single '/'
8+
- '**' # matches every branch
9+
10+
# This allows a subsequently queued workflow run to interrupt previous runs
11+
concurrency:
12+
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
13+
cancel-in-progress: true
414

515
jobs:
616
prettier:
@@ -26,20 +36,11 @@ jobs:
2636
echo "${{steps.prettier-run.outputs.prettier_output}}"
2737
2838
commitlint:
39+
name: Commitlint Check
2940
runs-on: ubuntu-latest
3041
steps:
3142
- uses: actions/checkout@v4
3243
with:
3344
fetch-depth: 0
3445

35-
- uses: dafnik/setup-node-pnpm@v3
36-
with:
37-
install-ignore-scripts: true
38-
39-
- name: Validate current commit (last commit) with commitlint
40-
if: github.event_name == 'push'
41-
run: pnpm exec commitlint --from HEAD~1 --to HEAD --verbose
42-
43-
- name: Validate PR commits with commitlint
44-
if: github.event_name == 'pull_request'
45-
run: pnpm exec commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose
46+
- uses: dafnik/commitlint@main

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
# commitlint
22

3-
A GitHub action to run commitlint CLI Checks.
3+
A simple GitHub action to run commitlint CLI Checks.
44

55
## Usage
66

77
```yml
88
jobs:
99
commitlint:
10+
name: Commitlint Check
1011
runs-on: ubuntu-latest
1112
steps:
1213
# For getting the commitlint config

action.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: 'commitlint'
22
author: 'Dafnik'
3-
description: 'A simple action which runs the commitlint CLI Check'
3+
description: 'A simple GitHub action to run commitlint CLI Checks.'
44
branding:
5-
icon: 'mail'
5+
icon: 'git-commit'
66
color: 'purple'
77

88
inputs:
@@ -21,9 +21,9 @@ runs:
2121
- name: Validate current commit (last commit) with commitlint
2222
shell: bash
2323
if: github.event_name == 'push'
24-
run: npm exec commitlint --from HEAD~1 --to HEAD --verbose
24+
run: commitlint --from HEAD~1 --to HEAD --verbose
2525

2626
- name: Validate PR commits with commitlint
2727
shell: bash
2828
if: github.event_name == 'pull_request'
29-
run: npm exec commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose
29+
run: commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose

0 commit comments

Comments
 (0)