ci: fix gitlint range

This commit is contained in:
Ben Grande 2023-11-06 17:24:10 +00:00
parent 50fc92e172
commit 01ae4f848d
No known key found for this signature in database
GPG Key ID: 00C64E14F51F9E56

View File

@ -8,6 +8,10 @@ name: Lint
# yamllint disable-line rule:truthy
on: [pull_request, push]
concurrency:
group: ci-${{ github.ref }}-1
cancel-in-progress: true
jobs:
lint:
runs-on: ubuntu-latest
@ -17,11 +21,16 @@ jobs:
- name: Install OS packages
# yamllint disable-line rule:line-length
run: sudo apt-get install -y python3-dev python3-pip shellcheck reuse
# gitlint is available on Debian but Ubuntu has an older version.
- name: Install pip packages
run: pip3 install salt-lint gitlint
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v3
- uses: pre-commit/action@v3.0.0
# TODO: lint range of commits, not only the latest pushed
- name: Gitlint
run: pwd; gitlint --debug
# yamllint disable-line rule:line-length
run: gitlint --debug --commits "${{ github.event.before }}..${{ github.sha }}"