Reorganize the workflow files for pull requests a little.

Split out the quick check GitHub action (which is really only meant for
forks). This prevents the quick check from running twice for PRs from
branches on the upstream repository. Also rename the WPT export action
file to make it clearer that it runs for pull requests.
This commit is contained in:
Martin Robinson 2023-04-11 19:17:23 +02:00
parent 15de7b99b7
commit cf4160b6ed
3 changed files with 30 additions and 3 deletions

View file

@ -1,4 +1,4 @@
name: WPT export
name: Pull request (WPT export)
on:
pull_request_target:
types: ['opened', 'synchronize', 'reopened', 'edited', 'closed']

23
.github/workflows/pull-request.yml vendored Normal file
View file

@ -0,0 +1,23 @@
name: Pull request
on:
pull_request:
types: ['opened', 'synchronize']
branches: ["**"]
jobs:
build-linux:
name: Linux
if: github.repository == 'servo/servo'
uses: ./.github/workflows/linux.yml
with:
layout: '2013'
unit-tests: true
build-linux-layout-2020:
name: Linux (layout-2020)
if: github.repository == 'servo/servo'
uses: ./.github/workflows/linux.yml
with:
layout: '2020'
unit-tests: false

View file

@ -1,6 +1,8 @@
# This action is meant as a quick check to be run when pushing to
# branches on forks. This allows forks to test the build and unit
# tests automatically without opening a pull request.
name: Quick check
on:
pull_request:
push:
branches:
["**", "!master", "!auto", "!try", "!try-linux", "!try-mac", "!try-windows", "!try-wpt", "!dependabot/**"]
@ -8,6 +10,7 @@ on:
jobs:
build-linux:
name: Linux
if: github.repository != 'servo/servo' || github.event_name == 'workflow_dispatch'
uses: ./.github/workflows/linux.yml
with:
layout: '2013'
@ -15,6 +18,7 @@ jobs:
build-linux-layout-2020:
name: Linux (layout-2020)
if: github.repository != 'servo/servo' || github.event_name == 'workflow_dispatch'
uses: ./.github/workflows/linux.yml
with:
layout: '2020'