Skip to content

Commit b383d73

Browse files
committed
Replace hard coded max char count with variable
This allows us more flexibility to adjust the max length in the future without doing a find-and-replace accross the workflow file
1 parent 8055f29 commit b383d73

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/build-pr-preview.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -337,23 +337,23 @@ jobs:
337337
# artifacts and just link to that instead
338338
- name: Upload lychee report to GitHub artifacts
339339
id: upload-artifact
340-
if: steps.lychee.outputs.exit_code != 0 && steps.char-count.outputs.size >= 65536
340+
if: steps.lychee.outputs.exit_code != 0 && steps.char-count.outputs.size >= vars.BROKEN_LINK_REPORT_CHAR_MAX
341341
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # 4.6.2
342342
with:
343343
path: ./lychee/out.md
344344
name: Link Checker Report
345345

346346
- name: Comment on PR with link to full link checker report
347-
if: steps.lychee.outputs.exit_code != 0 && steps.char-count.outputs.size >= 65536
347+
if: steps.lychee.outputs.exit_code != 0 && steps.char-count.outputs.size >= vars.BROKEN_LINK_REPORT_CHAR_MAX
348348
uses: marocchino/sticky-pull-request-comment@52423e01640425a022ef5fd42c6fb5f633a02728 # v2.9.1
349349
with:
350350
header: Link Checker Report
351351
message: |
352352
## Broken Link Checker
353-
Report exceeds max length of 65536 characters. See ${{steps.upload-artifact.outputs.artifact-url}} for full report
353+
Report exceeds max length of ${{vars.BROKEN_LINK_REPORT_CHAR_MAX}} characters. See ${{steps.upload-artifact.outputs.artifact-url}} for full report
354354
355355
- name: Comment on PR with link checker report
356-
if: steps.lychee.outputs.exit_code != 0 && steps.char-count.outputs.size < 65536
356+
if: steps.lychee.outputs.exit_code != 0 && steps.char-count.outputs.size < vars.BROKEN_LINK_REPORT_CHAR_MAX
357357
uses: marocchino/sticky-pull-request-comment@52423e01640425a022ef5fd42c6fb5f633a02728 # v2.9.1
358358
with:
359359
header: Link Checker Report

0 commit comments

Comments
 (0)