From 92019d4fdd350c510e40b5beaa2595449e68da6d Mon Sep 17 00:00:00 2001 From: "sentry-junior[bot]" <264270552+sentry-junior[bot]@users.noreply.github.com> Date: Tue, 1 Dec 2026 01:14:50 +0000 Subject: [PATCH] ci: Add a single Required checks job for branch protection and GoCD Co-Authored-By: Joshua Li <14209781+joshuarli@users.noreply.github.com> --- .github/workflows/ci.yml | 17 +++++++++++++++++ gocd/templates/bash/github-check-runs.sh | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9d293fff..f21e2602 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -276,3 +276,20 @@ jobs: configrepo: objectstore__main gocd_access_token: ${{ secrets.GOCD_ACCESS_TOKEN }} google_oidc_token: ${{ steps.auth.outputs.id_token }} + + # The one check that branch protection and GoCD wait on. It passes when every + # job in `needs` passed or was skipped, so neither has to name individual + # jobs or matrix legs. `needs` lists the upstream jobs too: when one of them + # fails, the jobs after it are skipped, not failed. + required-checks: + name: Required checks + needs: [lint, lint-python, test-all, test-python, docs] + # Run even when a dependency fails, which would otherwise skip this job. + if: always() + runs-on: ubuntu-latest + timeout-minutes: 3 + permissions: {} + steps: + - name: Check for failures + if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') + run: exit 1 diff --git a/gocd/templates/bash/github-check-runs.sh b/gocd/templates/bash/github-check-runs.sh index 9c80ab5f..b4d6c2a3 100644 --- a/gocd/templates/bash/github-check-runs.sh +++ b/gocd/templates/bash/github-check-runs.sh @@ -3,6 +3,6 @@ checks-githubactions-checkruns2 \ getsentry/objectstore \ "${GO_REVISION_OBJECTSTORE_REPO}" \ - "Test (all features)" \ + "Required checks" \ "Publish to GCR" \ "Upload Build Artifacts for GoCD" \