diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 55c14582..06b4140e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -57,7 +57,7 @@ jobs: # It RUNS ON EVERY EVENT and is never skipped. On anything that is not a pull # request the filter steps are skipped and `web` and `city3d` are `true`, so # push to main always runs the full suite. A skipped `changes` would be worse - # than wasteful: the deploy jobs below use the implicit `success()`, which a + # than wasteful: the `deploy` job below uses the implicit `success()`, which a # skipped ancestor anywhere up the chain turns into a skipped deploy. # # `web` lists every input of the development export and of the development @@ -1104,11 +1104,23 @@ jobs: # # `contents: read` only: deploy-frontend.yml talks to Cloudflare with an API # token from `secrets`, not to AWS over OIDC, so it needs no `id-token`. + # + # The `if` asks what each job in `needs` did, and does NOT rely on the + # implicit `success()`. That one also looks at every ancestor, and a push to + # main always has skipped ones (the Seldon race, the hosted twins and the + # rescues), so it skipped every deploy. `needs.*.result` covers whatever + # `needs` lists: a job added there cannot be forgotten here. `!cancelled()` + # is what switches the implicit check off. deploy-frontend: name: Deploy frontend needs: [quality, gates, webexport, devconsole, city3d, lockfile, test] if: >- - ${{ vars.OXY_1519_ROLLOUT_HOLD != 'true' && (github.event_name == 'push' && github.ref == 'refs/heads/main') }} + ${{ !cancelled() + && !contains(needs.*.result, 'failure') + && !contains(needs.*.result, 'cancelled') + && !contains(needs.*.result, 'skipped') + && vars.OXY_1519_ROLLOUT_HOLD != 'true' + && github.event_name == 'push' && github.ref == 'refs/heads/main' }} permissions: contents: read uses: ./.github/workflows/deploy-frontend.yml