Files
ResInsight/.github/workflows/spell-check-pr.yml
T
dependabot[bot] 8216eeb845 Bump actions/checkout from 5 to 6
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-24 12:24:42 +01:00

51 lines
1.5 KiB
YAML

name: Spell Check PR
on:
pull_request:
paths:
- 'ApplicationExeCode/**'
- 'ApplicationLibCode/**'
- 'Fwk/AppFwk/**'
- 'GrpcInterface/**'
permissions:
contents: read
jobs:
spell-check:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.10'
- name: Install codespell
run: pip install codespell
- name: Get changed files
id: changed-files
run: |
# Get the list of changed files in the PR
git fetch origin ${{ github.base_ref }}
CHANGED_FILES=$(git diff --name-only origin/${{ github.base_ref }}...HEAD | grep -E '^(ApplicationExeCode|ApplicationLibCode|Fwk/AppFwk|GrpcInterface)/' | grep -E '\.(cpp|h|inl|py|md|txt|cmake|yml|yaml)$' || true)
if [ -z "$CHANGED_FILES" ]; then
echo "No relevant files changed"
echo "files=" >> $GITHUB_OUTPUT
else
echo "Changed files:"
echo "$CHANGED_FILES"
# Convert to space-separated list for codespell
FILES_LIST=$(echo "$CHANGED_FILES" | tr '\n' ' ')
echo "files=$FILES_LIST" >> $GITHUB_OUTPUT
fi
- name: Run codespell on changed files
if: steps.changed-files.outputs.files != ''
run: |
codespell ${{ steps.changed-files.outputs.files }}