From e6558e35d28b915230870dc9b3a9f904b5a7c981 Mon Sep 17 00:00:00 2001 From: Martin Robinson Date: Fri, 1 Sep 2023 01:05:32 +0200 Subject: [PATCH] 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. --- .github/workflows/main.yml | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 22218897d19..cedb03b4c8f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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";