This repository has been archived by the owner on Jan 13, 2024. It is now read-only.
style: re-format / npx prettier --write "**/*.{md,yaml,yml}" #62
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Lint Commit Messages | |
on: push | |
jobs: | |
commit-lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
- name: Install commitlint | |
run: | | |
npm install --save-dev @commitlint/{config-conventional,cli} | |
- name: Lint commits | |
run: | | |
npx commitlint --from=origin/main --to=HEAD --config ./.github/workflows/configs/commitlint.config.js | |
check-dontmerge: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Check for DONTMERGE | |
run: | | |
result=$(find . \ | |
-type f \ | |
! -path './.github/workflows/commit-lint.yml' \ | |
! -name '*.snap' \ | |
-exec grep -Hn 'DONTMERGE' {} \;) | |
if [[ ! -z "$result" ]]; then | |
echo "$result" | |
exit 1 | |
fi |