From dc46a195b92ce5a3cf1e113baf5a6516f6c0bdcc Mon Sep 17 00:00:00 2001 From: Gheorghita Hurmuz Date: Fri, 9 May 2025 11:08:27 +0300 Subject: [PATCH] fix(ci): install deps for commitlint --- .github/workflows/commitlint.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commitlint.yml index 5f555caf..5812768e 100644 --- a/.github/workflows/commitlint.yml +++ b/.github/workflows/commitlint.yml @@ -16,10 +16,21 @@ jobs: with: node-version: 22 + - name: Install Git + run: | + if ! command -v git &> /dev/null; then + echo "Git is not installed. Installing..." + sudo apt-get update + sudo apt-get install -y git + else + echo "Git is already installed." + fi + - name: Install commitlint run: | npm install conventional-changelog-conventionalcommits npm install commitlint@latest + npm install @commitlint/config-conventional - name: Configure run: | @@ -27,7 +38,6 @@ jobs: - name: Validate current commit (last commit) with commitlint - if: github.event_name == 'push' run: npx commitlint --last --verbose - name: Validate PR commits with commitlint