30 lines
752 B
YAML
30 lines
752 B
YAML
---
|
|
name: Verify PR title
|
|
|
|
on:
|
|
workflow_call:
|
|
|
|
jobs:
|
|
lint_pr:
|
|
timeout-minutes: 10
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Setup node
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version-file: '.nvmrc'
|
|
# https://stackoverflow.com/questions/61010294/how-to-cache-yarn-packages-in-github-actions
|
|
cache: yarn
|
|
|
|
- name: Cache node modules
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: node_modules
|
|
key: ${{ runner.os }}-cache-node-modules-${{ hashFiles('yarn.lock') }}
|
|
|
|
- name: Check PR title
|
|
run: echo "${{ github.event.pull_request.title }}" | npx commitlint --config ./commitlint.config-ci.js
|