ci: never drop a main run's deploy when merges land close together #362
+27
-5
@@ -36,12 +36,14 @@ env:
|
||||
CARGO_NET_RETRY: "10"
|
||||
CARGO_HTTP_MULTIPLEXING: "false"
|
||||
|
||||
# Cancel superseded PR runs, but NEVER cancel main-branch runs — those build and
|
||||
# deploy per-service images, and cancelling one merge's deploy when the next
|
||||
# merge lands leaves a service un-deployed (as happened between two back-to-back
|
||||
# merges). So cancel-in-progress only for pull_request events.
|
||||
# Cancel superseded PR runs, but NEVER drop a main-branch run: each one deploys
|
||||
# only the services its own commit changed, so a dropped run leaves a service
|
||||
# un-deployed. `cancel-in-progress: false` is not enough, because a group keeps
|
||||
# one pending run and cancels a queued one when the next merge lands. So main
|
||||
# runs get a group per commit; the deploy jobs' own groups keep each service's
|
||||
# deploys in merge order.
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.sha }}
|
||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
jobs:
|
||||
@@ -201,6 +203,11 @@ jobs:
|
||||
runs-on: docker
|
||||
needs: [detect-changes]
|
||||
if: needs.detect-changes.outputs.agent == 'true'
|
||||
# One agent deploy at a time, in merge order. A queued one may be replaced
|
||||
# by a newer one, which builds from a later main and so includes it.
|
||||
concurrency:
|
||||
group: deploy-agent
|
||||
cancel-in-progress: false
|
||||
container:
|
||||
image: docker:27-cli
|
||||
steps:
|
||||
@@ -231,6 +238,11 @@ jobs:
|
||||
runs-on: docker
|
||||
needs: [detect-changes]
|
||||
if: needs.detect-changes.outputs.dashboard == 'true'
|
||||
# One dashboard deploy at a time, in merge order. A queued one may be replaced
|
||||
# by a newer one, which builds from a later main and so includes it.
|
||||
concurrency:
|
||||
group: deploy-dashboard
|
||||
cancel-in-progress: false
|
||||
container:
|
||||
image: docker:27-cli
|
||||
steps:
|
||||
@@ -259,6 +271,11 @@ jobs:
|
||||
runs-on: docker
|
||||
needs: [detect-changes]
|
||||
if: needs.detect-changes.outputs.docs == 'true'
|
||||
# One docs deploy at a time, in merge order. A queued one may be replaced
|
||||
# by a newer one, which builds from a later main and so includes it.
|
||||
concurrency:
|
||||
group: deploy-docs
|
||||
cancel-in-progress: false
|
||||
container:
|
||||
image: docker:27-cli
|
||||
steps:
|
||||
@@ -284,6 +301,11 @@ jobs:
|
||||
runs-on: docker
|
||||
needs: [detect-changes]
|
||||
if: needs.detect-changes.outputs.mcp == 'true'
|
||||
# One mcp deploy at a time, in merge order. A queued one may be replaced
|
||||
# by a newer one, which builds from a later main and so includes it.
|
||||
concurrency:
|
||||
group: deploy-mcp
|
||||
cancel-in-progress: false
|
||||
container:
|
||||
image: docker:27-cli
|
||||
steps:
|
||||
|
||||
Reference in new issue
Block a user