generated from remal-github-actions/template-typescript
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (43 loc) · 1.28 KB
/
codespell.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
name: 'codespell'
on:
push:
branches:
- 'main' # default branch
pull_request: { }
workflow_dispatch: { }
defaults:
run:
shell: bash
jobs:
codespell:
if: ${{
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/'))
|| (github.event_name == 'push' && !startsWith(github.event.head_commit.message, '[push-back]'))
|| github.event_name != 'push'
}}
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 1
- name: Find ignore words file
id: find-ignore-words-file
run: |
if [ -f ".codespellignore" ]; then
echo "ignoreWordsFile = '.codespellignore'"
echo 'ignoreWordsFile=true' >> $GITHUB_OUTPUT
else
echo "ignoreWordsFile = ''"
echo 'ignoreWordsFile=' >> $GITHUB_OUTPUT
fi
- name: Execute codespell
uses: codespell-project/actions-codespell@v2
with:
only_warn: 'true'
ignore_words_file: ${{steps.find-ignore-words-file.outputs.ignoreWordsFile}}
check_filenames: 'true'
check_hidden: 'false'
skip: './.git/**,./.yarn/**,./node_modules/**,./build/**,./dist/**,./coverage/**'