Skip to content

Commit d702fc8

Browse files
committed
feat: add npm cache for commitlint to speed up action
1 parent fcdbe44 commit d702fc8

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

action.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,16 @@ inputs:
1414
runs:
1515
using: 'composite'
1616
steps:
17+
- name: Cache commitlint
18+
id: cache-commitlint
19+
uses: actions/cache@v4
20+
with:
21+
path: ~/.npm
22+
key: ${{ runner.os }}-commitlint-cache@${{ inputs.commitlint_version }}
23+
1724
- name: Installing commitlint
1825
shell: bash
26+
if: steps.cache-commitlint.outputs.cache-hit != 'true'
1927
run: npm install --global commitlint@${{ inputs.commitlint_version }} @commitlint/config-conventional
2028

2129
- name: Validate current commit (last commit) with commitlint

0 commit comments

Comments
 (0)