Only run CI on pushes to main/master and pull requests (#7883)

Currently, when a maintainer opens a pull request from a branch in the
typeshed repository (instead of a fork), CI is run twice: once for the
PR and once for the push. This not only wastes CI minutes (and it seems
we're running into some limits lately), but also makes CI output twice
as large and more difficult to process.

The disadvantage is that a PR needs to be opened to run CI.
Alternatively, CI can be triggered manually.
This commit is contained in:
Sebastian Rittau
2022-05-20 14:14:25 +02:00
committed by GitHub
parent e7cbde0928
commit adf48f1f96

View File

@@ -3,6 +3,9 @@ name: Test
on:
workflow_dispatch:
push:
branches:
- main
- master
pull_request:
permissions: