mirror of
https://github.com/tldr-pages/tldr.git
synced 2026-08-29 04:21:03 +08:00
43 lines
1.3 KiB
YAML
43 lines
1.3 KiB
YAML
name: Codespell
|
|
permissions:
|
|
contents: read
|
|
|
|
on:
|
|
pull_request:
|
|
# Ignore all other languages except English
|
|
paths-ignore:
|
|
- 'pages.*/*/*'
|
|
- 'contributing-guides/style-guide.*.md'
|
|
- 'contributing-guides/translation-templates/*'
|
|
- 'package-lock.json'
|
|
|
|
jobs:
|
|
codespell:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
|
|
- name: Get changed files
|
|
id: changed-files
|
|
uses: tj-actions/changed-files@9426d40962ed5378910ee2e21d5f8c6fcbf2dd96 # v47.0.6
|
|
with:
|
|
# Ignore all other languages except English
|
|
files_ignore: |
|
|
pages.*/*/*
|
|
contributing-guides/style-guide.*.md
|
|
contributing-guides/translation-templates/*
|
|
package-lock.json
|
|
|
|
- name: Run Codespell
|
|
uses: codespell-project/actions-codespell@8f01853be192eb0f849a5c7d721450e7a467c579 # v2.2
|
|
# Only run if there are changed files to check
|
|
if: ${{ steps.changed-files.outputs.any_changed == 'true' }}
|
|
with:
|
|
ignore_words_file: .github/codespell-ignore
|
|
# Exit with 0 regardless of typos.
|
|
only_warn: 1
|
|
# Only check files in the PR
|
|
path: ${{ steps.changed-files.outputs.all_changed_files }}
|