From 223922bb36d38b2faad8af2e1e725ad8f32e2fcb Mon Sep 17 00:00:00 2001 From: Sam Sneddon Date: Mon, 16 Sep 2024 10:35:37 -0700 Subject: [PATCH] Make check-workflow-run run unconditionally This simplifies all of the logic we have where we conditionally run jobs even after earlier jobs have been skipped. The current behaviour doesn't actually work, because _all_ jobs are skipped following one job being skipped. This means safari-stable-results-notify doesn't actually get run, because it also gets skipped, even if the actual test runs ran successfully. --- .github/workflows/check-workflow-run.yml | 8 ++++++++ .github/workflows/safari_stable.yml | 7 +------ .github/workflows/safari_technology_preview.yml | 7 +------ 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/.github/workflows/check-workflow-run.yml b/.github/workflows/check-workflow-run.yml index 03ee38a7c91801..387c3065799b25 100644 --- a/.github/workflows/check-workflow-run.yml +++ b/.github/workflows/check-workflow-run.yml @@ -41,3 +41,11 @@ jobs: env: GIT_PUSH_OUTPUT: ${{ runner.temp }}/git-push-output/git-push-output.txt REFS: ${{ inputs.check-refs }} + + check-workflow-run-noop: + name: "Check for appropriate epochs (noop)" + if: ${{ github.event_name != 'workflow_run' }} + runs-on: + - ubuntu-22.04 + steps: + - run: exit 0 diff --git a/.github/workflows/safari_stable.yml b/.github/workflows/safari_stable.yml index 88f1e72ecc2122..0df13f43d4403b 100644 --- a/.github/workflows/safari_stable.yml +++ b/.github/workflows/safari_stable.yml @@ -33,13 +33,8 @@ jobs: safari-stable-results: name: "All Tests: Safari (stable)" needs: check-workflow-run - # We need always() here to then check for success/skipped from the - # dependency, as otherwise the skip cascades. See - # https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/using-jobs-in-a-workflow#defining-prerequisite-jobs. if: | - always() && - (needs.check-workflow-run.result == 'success' || needs.check-workflow-run.result == 'skipped') && - (github.event_name != 'workflow_run' || fromJSON(needs.check-workflow-run.outputs.updated-refs)[0] != null) + github.event_name != 'workflow_run' || fromJSON(needs.check-workflow-run.outputs.updated-refs)[0] != null runs-on: - self-hosted - webkit-ews diff --git a/.github/workflows/safari_technology_preview.yml b/.github/workflows/safari_technology_preview.yml index 7c02951813be62..01380aa718e325 100644 --- a/.github/workflows/safari_technology_preview.yml +++ b/.github/workflows/safari_technology_preview.yml @@ -33,13 +33,8 @@ jobs: safari-technology-preview-results: name: "All Tests: Safari Technology Preview" needs: check-workflow-run - # We need always() here to then check for success/skipped from the - # dependency, as otherwise the skip cascades. See - # https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/using-jobs-in-a-workflow#defining-prerequisite-jobs. if: | - always() && - (needs.check-workflow-run.result == 'success' || needs.check-workflow-run.result == 'skipped') && - (github.event_name != 'workflow_run' || fromJSON(needs.check-workflow-run.outputs.updated-refs)[0] != null) + github.event_name != 'workflow_run' || fromJSON(needs.check-workflow-run.outputs.updated-refs)[0] != null runs-on: - self-hosted - webkit-ews