diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a2e8b5b..665493b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -19,6 +21,8 @@ jobs: - uses: pre-commit/action@v2.0.0 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