Skip to content

Commit

Permalink
fix: restrict markdown tests to ubuntu runner (asyncapi#3318)
Browse files Browse the repository at this point in the history
  • Loading branch information
anshgoyalevil authored Oct 23, 2024
1 parent 0b09994 commit 62d6e9a
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/if-nodejs-pr-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: PR testing - if Node project

on:
pull_request:
pull_request_target:
types: [opened, reopened, synchronize, ready_for_review]
push:
branches: [master]
Expand Down Expand Up @@ -42,6 +42,9 @@ jobs:
- if: steps.should_run.outputs.shouldrun == 'true'
name: Checkout repository
uses: actions/checkout@v4
with:
ref: refs/pull/${{ github.event.pull_request.number }}/merge

- if: steps.should_run.outputs.shouldrun == 'true'
name: Check if Node.js project and has package.json
id: packagejson
Expand Down Expand Up @@ -76,7 +79,7 @@ jobs:
run: npm run generate:assets --if-present

# Run the test:md script and capture output
- if: steps.packagejson.outputs.exists == 'true'
- if: ${{ steps.packagejson.outputs.exists == 'true' && matrix.os == 'ubuntu-latest' }}
name: Run markdown checks
id: markdown_check
run: |
Expand All @@ -87,7 +90,7 @@ jobs:
# Post a comment using sticky-pull-request-comment
- name: Comment on PR with markdown issues
if: ${{ steps.markdown_check.outputs.markdown_output != '' }}
if: ${{ steps.markdown_check.outputs.markdown_output != '' && matrix.os == 'ubuntu-latest' }}
uses: marocchino/sticky-pull-request-comment@3d60a5b2dae89d44e0c6ddc69dd7536aec2071cd
with:
header: markdown-check-error
Expand All @@ -102,7 +105,7 @@ jobs:
```
# Delete the comment if there are no issues
- if: ${{ steps.markdown_check.outputs.markdown_output == '' }}
- if: ${{ steps.markdown_check.outputs.markdown_output == '' && matrix.os == 'ubuntu-latest' }}
name: Delete markdown check comment
uses: marocchino/sticky-pull-request-comment@3d60a5b2dae89d44e0c6ddc69dd7536aec2071cd
with:
Expand Down

0 comments on commit 62d6e9a

Please sign in to comment.