mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Remove logic for skipping duplicate workflows (#30260)
This logic was more important when bors was triggering duplicate workflows. Now that we've switched away from bors, benefit is much more marginal. In addition, it adds a bunch of complexity to an already complicated workflow. We can always re-add it later if we notice too many duplicated workflows.
This commit is contained in:
parent
d8581560d8
commit
e6558e35d2
1 changed files with 0 additions and 17 deletions
17
.github/workflows/main.yml
vendored
17
.github/workflows/main.yml
vendored
|
@ -48,23 +48,6 @@ jobs:
|
|||
uses: actions/github-script@v6
|
||||
with:
|
||||
script: |
|
||||
// Never skip workflow runs for pull requests, merge groups, or manually triggered
|
||||
// workfows / try jobs, which might need to actually run / retry WPT tests.
|
||||
if (!['issue_comment', 'merge_group', 'pull_request', 'workflow_run', 'workflow_call'].includes(context.eventName)) {
|
||||
// Skip the run if an identical run already exists. This helps to avoid running
|
||||
// the workflow over and over again for the same commit hash.
|
||||
if ((await github.rest.actions.listWorkflowRuns({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
workflow_id: "main.yml",
|
||||
head_sha: context.sha,
|
||||
status: "success",
|
||||
})).data.workflow_runs.length > 0) {
|
||||
console.log("Skipping workflow, because of duplicate job.");
|
||||
return { platform: "none" };
|
||||
}
|
||||
}
|
||||
|
||||
// We need to pick defaults if the inputs are not provided. Unprovided inputs
|
||||
// are empty strings in this template.
|
||||
let platform = "${{ inputs.platform }}" || "linux";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue