ci: fail the linter while the README notice is present

The labeler converts a PR to a draft while README.md has the review
notice. Nothing else stops a merge. If the labeler fails, or somebody
merges before it runs, the PR goes in with the notice.

Let's add a linter job that fails when README.md has the notice. We keep
it out of the main lint job. That way it doesn't wait for the tools tree
build, and it can be made a required status check by itself.

(cherry picked from commit f1ea185bcf5f3f286c92b015294190b23f7215f5)
This commit is contained in:
Daan De Meyer
2026-10-16 17:24:52 +01:00
committed by Luca Boccassi
parent dab14842b6
commit c06a76f5c4
+17
View File
@@ -14,6 +14,23 @@ permissions:
contents: read
jobs:
readme-notice:
name: Check for README notice
runs-on: ubuntu-24.04
steps:
- name: Repo checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
- name: Check that README.md has no review notice
run: |
if grep -F "Remove this line to confirm you've reviewed this PR before submitting." README.md >/dev/null; then
echo "::error file=README.md,line=1::Remove the review notice from README.md before merging."
exit 1
fi
build:
name: Lint Code Base
runs-on: ubuntu-24.04