File tree Expand file tree Collapse file tree 1 file changed +28
-7
lines changed Expand file tree Collapse file tree 1 file changed +28
-7
lines changed Original file line number Diff line number Diff line change 1- # SPDX-FileCopyrightText: 2022 leha-bot and contributors
1+ # SPDX-FileCopyrightText: 2022-2025 leha-bot and contributors
22#
33# SPDX-License-Identifier: BSL-1.0 OR BlueOak-1.0.0
44
1010 - ' **'
1111 pull_request :
1212 branches :
13- - master
14- - dev
13+ - ' master'
14+ - ' dev'
1515
1616jobs :
17- lint :
18- name : ' Lint'
17+ lint-commits :
18+ name : ' Lint commits '
1919
20- runs-on : ubuntu-latest
20+ strategy :
21+ matrix :
22+ system :
23+ - ubuntu-24.04
24+
25+ runs-on : ${{ matrix.system }}
2126
2227 steps :
28+ # Checkout whole repository
2329 - name : Checkout
2430 uses : actions/checkout@v4
2531 with :
2632 fetch-depth : 0
2733
28- - name : Lint
34+ # Get parent branch name for comparing on `push` event
35+ - name : Get branch (push)
36+ if : github.event_name == 'push'
37+ run : |
38+ echo "branch=remotes/origin/${{ github.event.repository.default_branch }}" >> $GITHUB_ENV
39+
40+ # Get parent branch name for comparing on `pull_request` event
41+ - name : Get branch (pull_request)
42+ if : github.event_name == 'pull_request'
43+ run : |
44+ echo "branch=remotes/origin/${{ github.event.pull_request.base.ref }}" >> $GITHUB_ENV
45+
46+ # Run commit linter from parent branch
47+ - name : Lint commits
2948 uses : remarkablemark/commitlint@v1
49+ with :
50+ from : ${{ env.branch }}
You can’t perform that action at this time.
0 commit comments