Skip to content

Commit

Permalink
ci: fixes commitlint job
Browse files Browse the repository at this point in the history
Uses the pre-installed commitlint and config for the commitlint job.
  • Loading branch information
anguspiv committed Dec 23, 2024
1 parent b31c59d commit e9a52e1
Showing 1 changed file with 15 additions and 19 deletions.
34 changes: 15 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,26 +32,22 @@ jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'

- name: Cache Node.js modules
id: cache-node-modules
uses: actions/cache@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: |
npm install conventional-changelog-conventionalcommits
npm install commitlint@latest
path: node_modules
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-modules-
- name: Install dependencies
run: npm ci

- name: Validate current commit (last commit) with commitlint
if: github.event_name == 'push'
Expand Down

0 comments on commit e9a52e1

Please sign in to comment.