Skip to content

Commit

Permalink
Merge pull request #42 from exoego/event-filter
Browse files Browse the repository at this point in the history
ci: If it is from a fork, run only on "pull_request_target" event
  • Loading branch information
exoego authored Jun 2, 2024
2 parents 406e472 + 9257df1 commit e3e4b67
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
- '*.md'
pull_request:
branches: [main]
pull_request_target:
branches: [main]
types: [opened, edited, synchronize, reopened]

permissions:
contents: read # for checkout repository
Expand All @@ -16,6 +19,9 @@ jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 5
if: |
(github.event.pull_request.head.repo.fork == true && github.event_name == 'pull_request_target') ||
(github.event.pull_request.head.repo.fork != true && github.event_name != 'pull_request_target')
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand Down

0 comments on commit e3e4b67

Please sign in to comment.