-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (43 loc) · 1.91 KB
/
spellchecker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Check spelling on pull request
on: [pull_request]
jobs:
spellcheck:
name: Spellcheck
runs-on: ubuntu-latest
steps:
# The checkout step
- uses: actions/checkout@v3
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- name: Get specific changed files
id: changed-files-specific
uses: tj-actions/changed-files@v25
with:
files: |
content/**/*.md
api/**/*.md
sha: ${{ github.event.pull_request.head.sha }}
base_sha: ${{ github.event.pull_request.base.sha }}
fetch-depth: 0
- name: List all changed files
if: steps.changed-files-specific.outputs.any_changed == 'true'
run: |
echo "CHG_FILES=${{ steps.changed-files-specific.outputs.all_changed_files }}" >> $GITHUB_ENV
- name: Check which files changed
if: steps.changed-files-specific.outputs.any_changed == 'true'
run : |
for file in content/payment-methods/unmatched-payments-dutch.md content/integrations/webshop-access-spanish.md content/integrations/webshop-access-ita.md content/payment-methods/unmatched-payments-german.md content/payment-methods/buy-now-pay-later.md content/payment-methods/credit-debit-cards.md content/integrations/our-integrations.md; do
if [[ "$CHG_FILES" =~ $file ]]; then
echo "$file needs to be removed"
CHG_FILES=$(echo $CHG_FILES | sed "s|$file||")
echo "CHG_FILES=$CHG_FILES" >> $GITHUB_ENV
fi
done
echo "Final list: $CHG_FILES"
- name: Run spellchecker on changed files
if: steps.changed-files-specific.outputs.any_changed == 'true'
uses: rojopolis/[email protected]
with:
source_files: ${{ env.CHG_FILES }}
task_name: markdown