diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8870dcbf9..77b30f3e4 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -2,9 +2,9 @@ name: CI on: pull_request: - types: - - opened - - synchronize + types: [opened, synchronize] + pull_request_target: + types: [opened, synchronize] workflow_dispatch: env: @@ -46,6 +46,9 @@ jobs: acc_tests: name: acceptance tests + if: > + github.event_name == 'pull_request_target' || + (github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false) runs-on: ubuntu-latest environment: tests steps: @@ -64,7 +67,12 @@ jobs: eco_check: name: eco/check - if: always() + if: > + always() && + ( + github.event_name == 'pull_request_target' || + (github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false) + ) needs: [lint, vet, unit_tests, acc_tests] runs-on: ubuntu-latest steps: