Skip to content

Commit

Permalink
Reintroduce pull_request in GitHub workflow with if case (#84)
Browse files Browse the repository at this point in the history
GH workflows will now also be run for PRs from forks.
  • Loading branch information
agoscinski authored Dec 5, 2024
1 parent 87cf264 commit a2288e2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
name: ci

on: [push]
on: [push, pull_request]

jobs:

pre-commit:
# runs only on pull request when from foreign repo, prevents duplicate runs
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name

runs-on: ubuntu-latest

Expand All @@ -19,6 +21,8 @@ jobs:
- uses: pre-commit/[email protected]

tests:
# runs only on pull request when from foreign repo, prevents duplicate runs
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name

runs-on: ubuntu-latest
timeout-minutes: 30
Expand Down

0 comments on commit a2288e2

Please sign in to comment.