Skip to content

docs: correct EU AI Act paragraph citations in compliance checklist #3550

docs: correct EU AI Act paragraph citations in compliance checklist

docs: correct EU AI Act paragraph citations in compliance checklist #3550

Workflow file for this run

name: Spell Check
on:
pull_request:
branches: [main]
paths:
- "**/*.md"
- "**/*.txt"
- "**/*.rst"
- "**/*.py"
- "**/*.ts"
- "**/*.js"
- "**/*.go"
- "**/*.rs"
- "**/*.cs"
- "**/*.yml"
- "**/*.yaml"
- ".cspell.json"
- ".cspell-repo-terms.txt"
- ".github/workflows/spell-check.yml"
- "scripts/ci/changed_lines.py"
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
spell-check:
name: Spell-check changed files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
fetch-depth: 0
# Fetched without --depth, because scoping the diff to this branch needs the
# merge base with the target branch. A depth-limited fetch into the full
# clone above writes .git/shallow and truncates that history, after which
# `git merge-base` fails and the diff falls back to the base tip -- which is
# what made this job spell-check the whole repository on any branch a few
# commits behind main.
- name: Fetch PR base
run: |
set -e
git fetch origin "${{ github.base_ref }}"
- name: Compute changed lines
id: diff
run: |
set -e
mkdir -p ci-diff
added_file="ci-diff/spell-check-added-lines.txt"
python scripts/ci/changed_lines.py \
--base "origin/${{ github.base_ref }}" \
--extensions ".md,.txt,.rst,.py,.ts,.js,.go,.rs,.cs,.yml,.yaml" \
--mode added-lines \
--output "$added_file"
if [ ! -s "$added_file" ]; then
echo "No changed lines to spell-check; skipping."
echo "has_changes=false" >> "$GITHUB_OUTPUT"
exit 0
fi
echo "added_file=$added_file" >> "$GITHUB_OUTPUT"
echo "has_changes=true" >> "$GITHUB_OUTPUT"
- name: Install cspell
run: npm install --ignore-scripts --global cspell@8.17.3
- name: cspell on changed lines
if: steps.diff.outputs.has_changes == 'true'
run: cspell "${{ steps.diff.outputs.added_file }}" --config .cspell.json --no-progress --no-summary