@@ -13,17 +13,62 @@ jobs:
1313 run-pre-commit :
1414 runs-on : ubuntu-latest
1515 steps :
16- - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
17- - uses : actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
16+ - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
17+ with :
18+ persist-credentials : false
19+ - uses : actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
1820 id : python-setup
1921 with :
2022 python-version : ' 3.x'
2123 - name : Run commands
2224 if : inputs.commands
2325 run : ${{ inputs.commands }}
2426 - name : Cache pre-commit environments
25- uses : actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4
27+ uses : actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
2628 with :
2729 path : ' ~/.cache/pre-commit'
2830 key : pre-commit-${{ steps.python-setup.outputs.python-version }}-${{ hashFiles('.pre-commit-config.yaml') }}
2931 - run : pipx run pre-commit run --show-diff-on-failure --color=always --all-files
32+
33+ check-pr-title :
34+ name : Check PR title
35+ if : github.event_name == 'pull_request'
36+ runs-on : ubuntu-latest
37+ # The calling workflow must grant these permissions.
38+ permissions :
39+ contents : read
40+ steps :
41+ - name : Checkout ${{ github.repository }} repo
42+ # needed for cspell.config.yml (project-specific)
43+ uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
44+ with :
45+ persist-credentials : false
46+ repository : ${{ github.repository }}
47+ ref : ${{ github.sha }}
48+ path : project-repo
49+ - name : Checkout cpp-linter/.github (org) repo
50+ # needed for committed.toml config (org-specific)
51+ uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
52+ with :
53+ persist-credentials : false
54+ repository : cpp-linter/.github
55+ path : org-repo
56+ - run : rustup update --no-self-update
57+ - name : Install cargo-binstall
58+ uses : cargo-bins/cargo-binstall@2bb61346d075e720d4c3da92f23b6d612d5a7543 # v1.15.3
59+ - name : Install committed
60+ run : cargo binstall -y committed
61+ env :
62+ GITHUB_TOKEN : ${{ github.token }}
63+ - name : conventional-commit
64+ run : >-
65+ echo "${{ github.event.pull_request.title }}"
66+ | committed --config ${{ github.workspace }}/org-repo/.github/committed.toml --commit-file -
67+ - uses : actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
68+ with :
69+ node-version : latest
70+ - name : spell check
71+ working-directory : project-repo
72+ run : >-
73+ echo "${{ github.event.pull_request.title }}"
74+ | npx cspell-cli lint stdin
0 commit comments