mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Allow trigger try workfows using labels (#30383)
This change adds and alternate method for triggering try changes. Instead of comments, changes are triggered via applying labels to pull requests. The action will remove the label from the request and start the requested jobs. This will require creating at least a few labels: - T-full - T-linux-wpt-2013 - T-linux-wpt-2020 - T-macos - T-windows More labels can be added as we support more configurations. The good thing about this change is that try jobs against the actual branch in the pull request instead of the master branch. This means that changes to CI can be tested (unlike for comment processing). One bit caveat with this change is that when adding multiple labels, a CI job is triggered for each. Only one real build will run for each label, but whether or more try jobs is triggered is a race condition. The first CI job to successfully remove the label will actually trigger the job. If the same job removes two compatible labels, then they can share a build (for instance two types of WPT linux jobs). If not there will be two. Note that this is at least as efficient as the current behavior.
This commit is contained in:
parent
66e169cc71
commit
fdcbe613ac
6 changed files with 159 additions and 64 deletions
6
.github/workflows/windows.yml
vendored
6
.github/workflows/windows.yml
vendored
|
@ -43,15 +43,15 @@ jobs:
|
|||
runs-on: windows-2019
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
if: github.event_name != 'issue_comment'
|
||||
if: github.event_name != 'issue_comment' && github.event_name != 'pull_request_target'
|
||||
with:
|
||||
fetch-depth: 2
|
||||
# This is necessary to checkout the pull request if this run was triggered
|
||||
# via an `issue_comment` action on a pull request.
|
||||
- uses: actions/checkout@v3
|
||||
if: github.event_name == 'issue_comment'
|
||||
if: github.event_name == 'issue_comment' || github.event_name == 'pull_request_target'
|
||||
with:
|
||||
ref: refs/pull/${{ github.event.issue.number }}/head
|
||||
ref: refs/pull/${{ github.event.issue.number || github.event.number }}/head
|
||||
fetch-depth: 2
|
||||
- name: ccache
|
||||
uses: hendrikmuhs/ccache-action@v1.2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue