Files
gentoo-zh/.github/workflows/pr-rules.yml
T
Zakk 11496921c1 .github: cancel superseded runs and fix check names
Cancel pkgcheck and pr-rules runs of a pull request that a newer push supersedes, and skip the report upload on cancellation so a half-finished scan is never posted.
Name the two target-selection jobs after their workflow, since both showed up as "scan changed ebuilds".
Give the tatt job a static name, because a skipped job never expands its matrix and showed the raw expression.

Signed-off-by: Zakk <zakk@gentoozh.org>
2026-10-20 16:07:56 +11:00

46 lines
1.2 KiB
YAML

name: pr-rules
on:
pull_request:
branches:
- master
# edited reruns the check after the description is fixed, without rerunning pkgcheck
types: [opened, reopened, synchronize, edited]
permissions:
contents: read
pull-requests: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
pr-rules:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v7
- name: check the commit rules
env:
GH_TOKEN: ${{ github.token }}
PR: ${{ github.event.pull_request.number }}
run: |
bad=$(scripts/commit-rules.sh "$PR")
if [ -n "$bad" ]; then
printf '%s\n' "$bad"
exit 1
fi
- name: check that the pull request template is kept
if: ${{ !cancelled() }}
env:
GH_TOKEN: ${{ github.token }}
PR: ${{ github.event.pull_request.number }}
run: |
missing=$(scripts/pr-template.sh "$PR")
if [ -n "$missing" ]; then
printf 'The description lost these checkboxes of the pull request template:\n%s\n' "$missing"
exit 1
fi