Skip to content

Commit

Permalink
Fix file type check in PR checker workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Timothy Johnson <timothy.johnson@broadcom.com>
  • Loading branch information
t1m0thyj committed Apr 4, 2024
1 parent 5832382 commit f1245d4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/pull-request-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,12 @@ jobs:
If you have addressed this issue already, refresh this page in your browser to remove this comment.
- name: File type checker
id: file_type_checker
uses: actions/github-script@v6
env:
PR_BODY_PATTERN: '\.md|\.jpg|\.gif|\.png|\.pdf'
run: |
[[ "${{ github.event.pull_request.body }}" =~ "$PR_BODY_PATTERN" ]] || exit 1
with:
script: |
new RegExp(process.env.PR_BODY_PATTERN).test(context.payload.pull_request.body) || process.exit(1)
- name: Missing File Name Comment PR
if: failure() && steps.file_type_checker.outcome == 'failure'
uses: marocchino/sticky-pull-request-comment@v2
Expand Down

0 comments on commit f1245d4

Please sign in to comment.