forked from check-spelling/check-spelling
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
584 lines (581 loc) · 22.9 KB
/
action.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
name: 'Check Spelling'
description: 'Spell check code and commits'
author: 'jsoref'
branding:
icon: 'edit-3'
color: 'red'
inputs:
GITHUB_TOKEN:
description: 'The GITHUB_TOKEN secret'
default: "${{ github.token }}"
required: true
bucket:
description: 'Container for spelling configuration'
required: false
project:
description: 'Folder/Branch within bucket containing spelling configuration'
required: false
config:
description: 'Spelling configuration directory'
default: ".github/actions/spelling"
required: false
experimental_path:
description: 'Directory root to check for spelling (note that bucket/project/config are independent of this)'
default: '.'
required: false
dictionary_url:
description: "Location of dictionary (if you aren't providing one in your repository)"
default: 'https://raw.githubusercontent.com/check-spelling/check-spelling/dictionary-$DICTIONARY_VERSION/dict.txt'
required: false
dictionary_version:
description: 'Version of the dictionary (only used if the url includes $DICTIONARY_VERSION)'
default: "20200211"
required: false
debug:
description: 'Debug'
required: false
experimental_apply_changes_via_bot:
description: '(Experimental) Allow users to quote-reply to the bot comment to update the PR'
default: "0"
required: false
experimental_parallel_jobs:
description: 'Number of CPUs available for running checks'
required: false
default: '2'
post_comment:
description: 'Post comment with report'
required: false
default: '1'
capture_output_unknown_words:
description: ''
required: false
deprecationMessage: 'Obsolete: outputs are always captured'
default: ''
capture_output_stale_words:
description: ''
deprecationMessage: 'Obsolete: outputs are always captured'
required: false
default: ''
capture_output_skipped_files:
description: ''
deprecationMessage: 'Obsolete: outputs are always captured'
required: false
default: ''
dictionary_source_prefixes:
description: 'JSON map of prefixes for dictionary urls'
required: false
default: '{"cspell": "https://raw.githubusercontent.com/check-spelling/cspell-dicts/v20230509/dictionaries/"}'
extra_dictionaries:
description: 'Space delimited list of URLs (or `prefix:`+path) to additional word lists'
required: false
default: ''
check_extra_dictionaries:
description: 'Compare unknown tokens against these dictionaries and suggest if applicable'
required: false
default:
cspell:ada/dict/ada.txt
cspell:aws/aws.txt
cspell:clojure/src/clojure.txt
cspell:companies/src/companies.txt
cspell:cpp/src/compiler-clang-attributes.txt
cspell:cpp/src/compiler-gcc.txt
cspell:cpp/src/compiler-msvc.txt
cspell:cpp/src/ecosystem.txt
cspell:cpp/src/lang-jargon.txt
cspell:cpp/src/lang-keywords.txt
cspell:cpp/src/people.txt
cspell:cpp/src/stdlib-c.txt
cspell:cpp/src/stdlib-cerrno.txt
cspell:cpp/src/stdlib-cmath.txt
cspell:cpp/src/stdlib-cpp.txt
cspell:cpp/src/template-strings.txt
cspell:cryptocurrencies/cryptocurrencies.txt
cspell:csharp/csharp.txt
cspell:css/dict/css.txt
cspell:dart/src/dart.txt
cspell:django/dict/django.txt
cspell:django/requirements.txt
cspell:docker/src/docker-words.txt
cspell:dotnet/dict/dotnet.txt
cspell:elixir/dict/elixir.txt
cspell:filetypes/filetypes.txt
cspell:fonts/fonts.txt
cspell:fullstack/dict/fullstack.txt
cspell:gaming-terms/dict/gaming-terms.txt
cspell:golang/dict/go.txt
cspell:haskell/dict/haskell.txt
cspell:html-symbol-entities/entities.txt
cspell:html/dict/html.txt
cspell:html/src/svg.txt
cspell:java/src/java-terms.txt
cspell:java/src/java.txt
cspell:k8s/dict/k8s.txt
cspell:latex/dict/latex.txt
cspell:latex/samples/sample-words.txt
cspell:lisp/lisp.txt
cspell:lorem-ipsum/dictionary.txt
cspell:lua/dict/lua.txt
cspell:mnemonics/src/mnemonics.txt
cspell:monkeyc/src/monkeyc_keywords.txt
cspell:node/dict/node.txt
cspell:npm/dict/npm.txt
cspell:php/dict/php.txt
cspell:powershell/dict/powershell.txt
cspell:public-licenses/src/additional-licenses.txt
cspell:public-licenses/src/generated/public-licenses.txt
cspell:python/src/additional_words.txt
cspell:python/src/common/extra.txt
cspell:python/src/python/python-lib.txt
cspell:python/src/python/python.txt
cspell:r/src/r.txt
cspell:redis/dict/redis.txt
cspell:ruby/dict/ruby.txt
cspell:rust/dict/rust.txt
cspell:scala/dict/scala.txt
cspell:shell/dict/shell-all-words.txt
cspell:software-terms/dict/softwareTerms.txt
cspell:software-terms/dict/webServices.txt
cspell:sql/src/sql.txt
cspell:sql/src/tsql.txt
cspell:svelte/dict/svelte.txt
cspell:swift/src/swift.txt
cspell:typescript/dict/typescript.txt
extra_dictionary_limit:
description: 'Limit the number of suggested extra dictionaries.'
required: false
default: '5'
event_aliases:
description: >-
Try to treat a GitHub event "a" as GitHub event "b" (JSON map).
If this flag was available before this tool recognized `pull_request_target`,
`{"pull_request_target":"pull_request"}` would have mapped it to `pull_request`.
required: false
default: ''
shortest_word:
description: 'Shortest word'
required: false
default: '3'
longest_word:
description: 'Longest word'
required: false
default: ''
experimental_commit_note:
description: 'If set, commit updates to expect automatically with this note'
required: false
default: ''
suppress_push_for_open_pull_request:
description: "If set, do not do work in response to `push` if there is an open `pull` request to the repository for the branch (this assumes there's a `pull_request_target` event configured)."
required: false
default: ''
report_title_suffix:
description: 'Suffix for report title (useful if you are using a matrix strategy or are using experimental_path)'
required: false
default: ''
only_check_changed_files:
description: 'If set, only check files changed since the last push'
required: false
default: ''
custom_task:
description: 'Run an internal task instead of responding to a GitHub event. Values: "comment"'
# This will be superseded by task
required: false
default: ''
internal_state_directory:
description: 'Used for passing internal state from the (default) check mode to the comment module'
required: false
default: ''
check_file_names:
description: 'Spell check file paths'
required: false
default: ''
check_commit_messages:
description: 'List of extra text to check (latest `commit` message, messages for pending `commits`, PR `title`, PR `description`)'
required: false
default: ''
anonymize_secpoll_source:
description: 'Perform secpoll queries via a public dns server'
required: false
default: ''
ignore_security_advisory:
description: 'Set to the value of the current security advisory to accept the reported risk -- value must match -- do not set if there is no current advisory'
required: false
default: ''
largest_file:
description: 'File size limit'
required: false
default: '1048576'
unknown_word_limit:
description: 'Only report an unknown word this many times'
required: false
default: '5'
warnings:
description: 'List of events that are warnings (items that are neither warnings nor notices will result in an :x:)'
required: false
default: bad-regex,binary-file,deprecated-feature,large-file,limited-references,no-newline-at-eof,noisy-file,non-alpha-in-dictionary,token-is-substring,unexpected-line-ending,whitespace-in-dictionary,minified-file,unsupported-configuration
notices:
description: 'List of events that are notices (items that are neither warnings nor notices will result in an :x:)'
required: false
default: candidate-pattern
quit_without_error:
description: 'Suppress failure code exit code -- it will be available via outputs.result_code'
required: false
default: ''
spell_check_this:
description: 'Repository with default configuration to use if no configuration is found in a .github/actions/spelling directory'
required: false
default: ''
ssh_key:
description: 'Key for checking out / pushing to updates (and trigger workflow cascades)'
required: false
default: ''
checkout:
description: 'Whether to check out a repository'
required: false
default: ''
task:
description: 'Task to perform (spelling, comment, ...)'
required: false
default: ''
disable_checks:
description: 'Some heuristics might not do what you want, it may be possible to suppress them'
required: false
default: ''
alternate_engine:
description: 'Alternate engine to use'
required: false
default: ''
alternate_engine_key:
description: 'ssh key to retrieve alternate engine'
required: false
default: ''
use_sarif:
description: 'Publish Sarif report'
required: false
default: ''
use_magic_file:
description: 'Use magic file to skip binary files'
required: false
default: ''
caller_container:
description: "Hack for nektos/act - pass the outputs.docker_container to give check-spelling a way to retrieve data it needs to report a comment"
required: false
candidate_example_limit:
description: 'Control the number of examples shown for candidate patterns'
required: false
default: 3
summary_table:
description: 'Provide item table (paths, content)'
required: false
default: 1
ignore-pattern:
description: 'Word Splitter Ignore Pattern'
required: false
default: "[^a-zA-Z']"
upper-pattern:
description: 'Word Splitter Upper Pattern'
required: false
default: "[A-Z]"
lower-pattern:
description: 'Word Splitter Lower Pattern'
required: false
default: "[a-z]"
not-lower-pattern:
description: 'Word Splitter Not Lower Pattern'
required: false
default: "[^a-z]"
not-upper-or-lower-pattern:
description: 'Word Splitter Not Upper or Lower Pattern'
required: false
default: "[^A-Za-z]"
punctuation-pattern:
description: 'Word Splitter Punctuation Pattern'
required: false
default: "'"
report-timing:
description: 'Report processing time for files'
required: false
default: ''
cache-dictionaries:
description: 'Cache dictionaries'
required: false
default: 1
outputs:
unknown_words:
description: "Unrecognized words (should be added to expect.txt)"
value: ${{ steps.spelling.outputs.unknown_words }}
stale_words:
description: "Stale words (should be removed from expect.txt) as an output"
value: ${{ steps.spelling.outputs.stale_words }}
skipped_files:
description: "Skipped files (could be added to excludes.txt)"
value: ${{ steps.spelling.outputs.skipped_files }}
suggested_dictionaries:
description: "Suggested dictionaries (could be added to extra_dictionaries)"
value: ${{ steps.spelling.outputs.suggested_dictionaries }}
warnings:
description: "Warnings"
value: ${{ steps.spelling.outputs.warnings }}
internal_state_directory:
description: 'Used for passing internal state from the (default) check mode to the comment module'
value: ${{ steps.spelling.outputs.internal_state_directory }}
result_code:
description: "Result (indicates unrecognized words were found or comment needs to be collapsed)"
value: ${{ steps.spelling.outputs.result_code }}
followup:
description: "Next task"
value: ${{ steps.spelling.outputs.followup }}
docker_container:
description: "Hack for nektos/act - pass to inputs.caller_container to give check-spelling a way to retrieve data it needs to report a comment"
value: ${{ steps.spelling.outputs.docker_container }}
runs:
using: 'composite'
steps:
- name: act-broken
if: env.ACT && (github.action_path || env.GITHUB_ACTION_PATH) && (env.GITHUB_ACTION_PATH != github.action_path)
shell: bash
run: |
echo '::error ::This version of nektos/act is broken. See https://github.com/check-spelling/check-spelling/wiki/Breaking-Change:-Dropping-support-for-broken-act'
exit 1
- name: act-windows-shim
if: env.ACT
shell: bash
run: |
THIS_ACTION_PATH=$(realpath "$GITHUB_ACTION_PATH")
chmod +x $THIS_ACTION_PATH/*.sh $THIS_ACTION_PATH/*.pl $THIS_ACTION_PATH/wrappers/*
perl -pi -e's/\015\012/\012/g' $THIS_ACTION_PATH/*.sh $THIS_ACTION_PATH/*.pl $THIS_ACTION_PATH/wrappers/*
- name: parse alternate engine
id: parse-alternate-engine
if: inputs.alternate_engine
shell: bash
run: |
echo "repo=$(echo '${{ inputs.alternate_engine }}' | perl -pe 's/\@.*//')" >> "$GITHUB_OUTPUT"
echo "branch=$(echo '${{ inputs.alternate_engine }}' | perl -ne 'next unless s/.*\@//; print')" >> "$GITHUB_OUTPUT"
- name: alternate-engine
if: inputs.alternate_engine
uses: actions/checkout@v4
with:
path: alternate-engine
repository: ${{ steps.parse-alternate-engine.outputs.repo }}
ref: ${{ steps.parse-alternate-engine.outputs.branch }}
ssh-key: ${{ inputs.alternate_engine_key }}
persist-credentials: false
- name: install-alternate-engine
if: inputs.alternate_engine
shell: bash
run: |
rsync --delete --exclude=.git -a alternate-engine/ "$GITHUB_ACTION_PATH"/
rm -rf alternate-engine/
- name: shim-path
shell: bash
run: |
THIS_ACTION_PATH=$(realpath "$GITHUB_ACTION_PATH")
echo "THIS_ACTION_PATH=$THIS_ACTION_PATH" >> "$GITHUB_ENV"
echo "PATH=$THIS_ACTION_PATH/wrappers:$PATH" >> "$GITHUB_ENV"
- name: check-actions
id: check-actions
env:
spellchecker: ${{ env.THIS_ACTION_PATH }}
GH_ACTION_REPOSITORY: ${{ github.action_repository || github.repository }}
GH_ACTION_REF: ${{ github.action_ref || github.ref_name }}
run: |
secpoll
shell: bash
- name: checkout
id: checkout-replacement
if: inputs.checkout && inputs.checkout != 'false' && !inputs.custom_task && env.replace_v3_actions_checkout
uses: check-spelling/actions-checkout@v4
with:
path: ${{ inputs.experimental_path }}
ssh-key: ${{ inputs.ssh_key }}
fetch-depth: ${{ !contains(inputs.check_commit_messages, 'commits') && '1' || '0' }}
token: ${{ inputs.GITHUB_TOKEN }}
ref: |
${{
github.event_name == 'issue_comment' &&
github.event.issue.pull_request &&
github.event.pull_request.head.sha ||
''
}}
- name: checkout
if: inputs.checkout && inputs.checkout != 'false' && !inputs.custom_task && !env.replace_v4_actions_checkout
uses: actions/checkout@v4
with:
path: ${{ inputs.experimental_path }}
ssh-key: ${{ inputs.ssh_key }}
fetch-depth: ${{ !contains(inputs.check_commit_messages, 'commits') && '1' || '0' }}
token: ${{ inputs.GITHUB_TOKEN }}
ref: |
${{
github.event_name == 'issue_comment' &&
github.event.issue.pull_request &&
github.event.pull_request.head.sha ||
''
}}
- name: checkout-merge
id: checkout-merge
if: github.event.pull_request.number && (contains(github.event_name, 'pull_request')) && (inputs.checkout && inputs.checkout != 'false' && !inputs.custom_task && !inputs.task)
uses: check-spelling/[email protected]
with:
path: ${{ inputs.experimental_path }}
- name: raise-merge-failure
if: steps.checkout-merge.outputs.message
env:
MESSAGE: ${{ steps.checkout-merge.outputs.message }}
shell: bash
run: |
echo ::error "::$MESSAGE"
- name: save sha
if: (contains(github.event_name, 'pull_request')) && (inputs.checkout && inputs.checkout != 'false' && !inputs.custom_task && !inputs.task) && inputs.use_sarif
shell: bash
run: |
cd "${{ inputs.experimental_path }}"
git show HEAD
PRIVATE_SARIF_REF="refs/pull/${{ github.event.pull_request.number }}/merge"
echo "PRIVATE_SARIF_REF=$PRIVATE_SARIF_REF" >> "$GITHUB_ENV"
git fetch origin "$PRIVATE_SARIF_REF"
echo "PRIVATE_SARIF_SHA=$(git rev-parse FETCH_HEAD)" >> "$GITHUB_ENV"
- name: prepare
if: inputs.task && inputs.task != 'spelling' && (!env.ACT || github.token)
run: |
mkdir -p /tmp/data;
echo "INPUT_INTERNAL_STATE_DIRECTORY=/tmp/data" >> "$GITHUB_ENV"
shell: bash
- name: retrieve-comment
if: inputs.task && inputs.task != 'spelling' && (!env.ACT || github.token)
uses: actions/download-artifact@v4
with:
name: "check-spelling-comment"
path: /tmp/data
- name: hash-dictionaries
id: hash-dictionaries
if: ${{ !inputs.task || inputs.task == 'spelling' }}
env:
INPUT_TASK: hash-dictionaries
INPUT_DICTIONARY_SOURCE_PREFIXES: ${{ inputs.dictionary_source_prefixes || inputs.dictionary-source-prefixes }}
INPUT_EXTRA_DICTIONARIES: ${{ inputs.extra_dictionaries || inputs.extra-dictionaries }} ${{ inputs.check_extra_dictionaries || inputs.check-extra-dictionaries }}
INPUT_USE_SARIF: ${{ inputs.use_sarif || inputs.use-sarif }}
shell: bash
run: |
unknown-words
- name: retrieve-dictionaries
id: retrieve-dictionaries
if: ${{ env.DICTIONARY_URLS_HASH }}
uses: actions/cache/restore@v4
with:
path: ${{ env.THIS_ACTION_PATH }}/dictionaries
key: check-spelling-dictionaries-${{ env.DICTIONARY_URLS_HASH }}-${{ github.sha}}
restore-keys: check-spelling-dictionaries-${{ env.DICTIONARY_URLS_HASH }}
- name: perl configuration
id: perl-config
if: steps.hash-dictionaries.outputs.perl-libraries
shell: bash
run: |
perl_modules="$(
echo "${{ steps.hash-dictionaries.outputs.perl-libraries }}" |tr " " "\n" |sort|xargs)"
perl_modules_sha=$(echo "$perl_modules" | shasum | perl -pe 's/\s.*//')
installsitearch=$(perl -V:'installsitearch' | perl -pe 's/.*=.(.*).;/$1/')
installsitelib=$(perl -V:'installsitelib' | perl -pe 's/.*=.(.*).;/$1/')
sudo install -d -o $(whoami) "$installsitearch" "$installsitelib"
(
echo "installsitearch=$installsitearch"
echo "installsitelib=$installsitelib"
echo "perl-modules=$perl_modules"
echo "perl-key=check-spelling-perl-$(perl -e 'print "$^V"')-$perl_modules_sha"
) >> "$GITHUB_OUTPUT"
- name: retrieve perl libraries arch
id: retrieve-perl-libraries-arch
if: steps.perl-config.outputs.installsitearch
uses: actions/cache/restore@v4
with:
path: ${{ steps.perl-config.outputs.installsitearch }}
key: ${{ steps.perl-config.outputs.perl-key }}-arch
- name: retrieve perl libraries lib
id: retrieve-perl-libraries-lib
if: steps.perl-config.outputs.installsitelib
uses: actions/cache/restore@v4
with:
path: ${{ steps.perl-config.outputs.installsitelib }}
key: ${{ steps.perl-config.outputs.perl-key }}-lib
- name: install perl modules
if: steps.perl-config.outputs.perl-modules
shell: bash
run: |
cpan_modules=$(
for module in ${{ steps.perl-config.outputs.perl-modules }}; do
perl -e "use $module; 1;" > /dev/null 2>/dev/null || echo $module
done | xargs
)
if [ -n "$cpan_modules" ]; then
command -v cpanm >/dev/null 2>/dev/null || curl -s -S -L https://cpanmin.us | perl - --sudo App::cpanminus
perl `command -v cpanm` -S --notest $cpan_modules
fi
- name: check-spelling
id: spelling
if: env.MERGE_FAILED != '1'
env:
INPUTS: ${{ toJSON(inputs) }}
DEBUG: ${{ inputs.debug }}
spellchecker: ${{ env.THIS_ACTION_PATH }}
GH_ACTION_REPOSITORY: ${{ github.action_repository || github.repository }}
GH_ACTION_REF: ${{ github.action_ref || github.ref_name }}
run:
unknown-words
shell: bash
- name: save-dictionaries
uses: actions/cache/save@v4
if: (success() || failure()) && steps.spelling.outputs.CACHE_DICTIONARIES == '1'
with:
path: ${{ env.THIS_ACTION_PATH }}/dictionaries
key: check-spelling-dictionaries-${{ env.DICTIONARY_URLS_HASH }}-${{ github.sha}}
- name: save perl libraries arch
if: ${{ (success() || (failure() && env.MERGE_FAILED != '1')) && steps.retrieve-perl-libraries-arch.outputs.cache-hit != 'true' && steps.perl-config.outputs.installsitearch }}
id: save-perl-libraries-arch
uses: actions/cache/save@v4
with:
path: ${{ steps.perl-config.outputs.installsitearch }}
key: ${{ steps.perl-config.outputs.perl-key }}-arch
- name: save perl libraries lib
if: ${{ (success() || (failure() && env.MERGE_FAILED != '1')) && steps.retrieve-perl-libraries-lib.outputs.cache-hit != 'true' && steps.perl-config.outputs.installsitelib }}
id: save-perl-libraries-lib
uses: actions/cache/save@v4
with:
path: ${{ steps.perl-config.outputs.installsitelib }}
key: ${{ steps.perl-config.outputs.perl-key }}-lib
- name: store-comment
if: (contains(github.event_name, 'pull_request') ||
github.event_name == 'push') &&
inputs.custom_task != 'comment' &&
((failure() && env.MERGE_FAILED != '1') || steps.spelling.outputs.followup) &&
steps.spelling.outputs.internal_state_directory
uses: actions/upload-artifact@v4
with:
name: "check-spelling-comment"
path: |
${{ steps.spelling.outputs.internal_state_directory }}
- name: Shim Sarif
id: shim-sarif
if: (success() || (failure() && env.MERGE_FAILED != '1')) && env.UPLOAD_SARIF != '' && env.PRIVATE_SARIF_SHA != ''
shell: bash
run: |
cd "${{ inputs.experimental_path }}"
git reset "$PRIVATE_SARIF_SHA"
- name: artifact-sarif
id: artifact-sarif
if: (success() || (failure() && env.MERGE_FAILED != '1')) && env.UPLOAD_SARIF != ''
uses: actions/upload-artifact@v4
with:
name: "check-spelling-sarif"
retention-days: 1
path: |
${{ env.UPLOAD_SARIF }}
- name: upload-sarif
id: upload-sarif
if: (success() || (failure() && env.MERGE_FAILED != '1')) && env.UPLOAD_SARIF != ''
uses: github/codeql-action/upload-sarif@v2
with:
wait-for-processing: false
sarif_file: ${{ env.UPLOAD_SARIF }}
category: ${{ inputs.report_title_suffix && format('{0}-{1}', 'check-spelling', inputs.report_title_suffix) || 'check-spelling' }}
checkout_path: ${{ inputs.experimental_path }}
ref: ${{ env.PRIVATE_SARIF_REF }}
sha: ${{ env.PRIVATE_SARIF_SHA }}