Merge pull request #107 from SpiderX/dependabot-github_actions-tj-act… #253
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: styles | |
on: # yamllint disable-line rule:truthy | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
permissions: | |
contents: read | |
jobs: | |
gitlint-utility: | |
name: gitlint-utility | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Install gitlint | |
run: pip install gitlint-core | |
- name: Run gitlint on pull request | |
if: ${{ github.event_name == 'pull_request' }} | |
run: >- | |
echo '${{ github.event.pull_request.head.sha }}.. | |
${{ github.event.pull_request.base.sha }}' | tr -d ' ' | |
| xargs gitlint --commits | |
- name: Run gitlint on push | |
if: ${{ github.event_name == 'push' }} | |
run: >- | |
echo '${{ github.event.before }}.. | |
${{ github.event.after }}' | tr -d ' ' | xargs gitlint --commits | |
gitlint-action: | |
name: gitlint-action | |
runs-on: ubuntu-latest | |
if: ${{ github.event_name == 'pull_request' }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Run gitlint-action | |
uses: aschbacd/[email protected] | |
with: | |
re-commit-message-subject: >- | |
"^(?P<change_type>feat|fix|style|docs|ci)(\\((?P<category> | |
acct-(group|user)|app-(admin|backup|containers|crypt|editors|emulation| | |
forensics|metrics|misc|office|shells|text)|dev-(cpp|db|haskell|libs|ml| | |
php|python|util|vcs)|kde-misc|media-(gfx|libs|radio|sound|video)| | |
net-(analyzer|dns|firewall|ftp|im|libs|misc|p2p|voip|vpn)| | |
sci-visualization|sys-(apps|cluster|fs|power|process)|www-(apps|plugins| | |
servers)|x11-misc)\/(?P<package>.*)\\))?:\\s(?P<description>.*)?" |