mirror of
https://github.com/ahmadk953/poixpixel-discord-bot.git
synced 2025-04-01 01:04:16 +00:00
ci: added commitlint GitHub CI action
This commit is contained in:
parent
f91ac5f04d
commit
19247de2b8
1 changed files with 36 additions and 0 deletions
36
.github/workflows/commitlint.yml
vendored
Normal file
36
.github/workflows/commitlint.yml
vendored
Normal file
|
@ -0,0 +1,36 @@
|
|||
name: Commitlint
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
commitlint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Install required dependencies
|
||||
run: |
|
||||
apt update
|
||||
apt install -y sudo
|
||||
sudo apt install -y git curl
|
||||
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt install -y nodejs
|
||||
- name: Print versions
|
||||
run: |
|
||||
git --version
|
||||
node --version
|
||||
npm --version
|
||||
npx commitlint --version
|
||||
- name: Install commitlint
|
||||
run: |
|
||||
yarn add conventional-changelog-conventionalcommits
|
||||
yarn add commitlint@latest
|
||||
|
||||
- name: Validate current commit (last commit) with commitlint
|
||||
if: github.event_name == 'push'
|
||||
run: npx commitlint --last --verbose
|
||||
|
||||
- name: Validate PR commits with commitlint
|
||||
if: github.event_name == 'pull_request'
|
||||
run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
|
Loading…
Add table
Reference in a new issue