Skip to content

Commit

Permalink
feat: patata
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelgrc committed Mar 4, 2024
1 parent 2f50f5a commit be6c31a
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/commit-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Commit lint

on: [push, pull_request]

jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
// - name: Install git
run: |
apt update
apt install -y sudo
sudo apt install -y git
- uses: actions/setup-node@v4
with:
node-version: 18.x
- 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

- name: Validate current commit (last commit) with commitlint
if: github.event_name == 'push'
run: npx commitlint --from HEAD~1 --to HEAD --verbose

- name: Validate PR commits with commitlint
if: github.event_name == 'pull_request'
run: npx commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose

0 comments on commit be6c31a

Please sign in to comment.