-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (58 loc) · 1.9 KB
/
commitlint.yml
File metadata and controls
59 lines (58 loc) · 1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# ==========================
#
# THIS IS A GENERATED FILE. Don't modify this file.
#
# Modify file in .github/jsTemplates/workflows/commitlint.yml.ts
#
# ==========================
name: commitlint
'on':
pull_request:
branches:
- develop
- master
jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Git fetch Base - ${{ github.base_ref }}
run: |
git fetch --no-tags --prune --progress --no-recurse-submodules origin +$BASE:$BASE
env:
BASE: ${{ github.base_ref }}
- name: Use Node.js 12.x
uses: actions/setup-node@v2.1.5
with:
node-version: 12.x
- name: Get npm cache directory
id: get-npm-cache
run: |
echo "::set-output name=dir::$(npm config get cache)"
- name: Cache Node.js modules
uses: actions/cache@v2.1.5
env:
cache-name: cache-node-modules
with:
path: ${{ steps.get-npm-cache.outputs.dir }}
key: ${{ runner.OS }}-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-${{ env.cache-name }}-
${{ runner.OS }}-
- name: Cache Project node_modules
uses: actions/cache@v2.1.5
id: cache-project-node-modules
env:
cache-name: cache-project-node-modules
with:
path: node_modules
key: ${{ runner.OS }}-${{ env.cache-name }}-${{ github.repository }}-${{ hashFiles('**/package-lock.json') }}
- name: Install Dependencies
if: steps.cache-project-node-modules.outputs.cache-hit != 'true'
run: npm ci
- name: Commit Lint from ${{ github.base_ref }}
run: npx commitlint -g .commitlintrc.ci.js --from $(git merge-base --fork-point $BASE) --verbose
env:
BASE: ${{ github.base_ref }}