2022-11-08 15:38:30 +00:00
|
|
|
---
|
|
|
|
name: Verify PR title
|
|
|
|
|
|
|
|
on:
|
2023-04-14 09:47:41 +00:00
|
|
|
workflow_call:
|
|
|
|
|
2022-11-08 15:38:30 +00:00
|
|
|
jobs:
|
|
|
|
lint_pr:
|
2023-04-14 09:47:41 +00:00
|
|
|
timeout-minutes: 10
|
2023-04-03 13:53:50 +00:00
|
|
|
runs-on: ubuntu-22.04
|
2022-11-08 15:38:30 +00:00
|
|
|
steps:
|
2023-01-30 21:06:18 +00:00
|
|
|
- name: Checkout
|
2023-04-03 13:53:50 +00:00
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Setup node
|
|
|
|
uses: actions/setup-node@v3
|
2022-11-08 15:38:30 +00:00
|
|
|
with:
|
2023-04-03 13:53:50 +00:00
|
|
|
node-version-file: '.nvmrc'
|
|
|
|
# https://stackoverflow.com/questions/61010294/how-to-cache-yarn-packages-in-github-actions
|
|
|
|
cache: yarn
|
|
|
|
|
2023-04-14 09:47:41 +00:00
|
|
|
- name: Cache node modules
|
|
|
|
uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: node_modules
|
|
|
|
key: ${{ runner.os }}-cache-node-modules-${{ hashFiles('yarn.lock') }}
|
2023-04-03 13:53:50 +00:00
|
|
|
|
2022-11-08 15:38:30 +00:00
|
|
|
- name: Check PR title
|
2023-01-30 21:06:18 +00:00
|
|
|
run: echo "${{ github.event.pull_request.title }}" | npx commitlint --config ./commitlint.config-ci.js
|