From da87d576de7210cafbb6a2f7e6a1e1178fb46d57 Mon Sep 17 00:00:00 2001 From: finalerock44 <77282157+finalerock44@users.noreply.github.com> Date: Thu, 17 Sep 2026 12:59:48 +0100 Subject: [PATCH] Document --cancel-previous No code change: argv is forwarded verbatim, so the flag already works. What needed saying is that the context comes from the DCD_GH_* env vars the job sets, and that DCD_CHECK_NAME scopes the group when one commit runs this more than once. Co-Authored-By: Claude Opus 5 (1M context) --- README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/README.md b/README.md index 1497092..1eb9f58 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,30 @@ eas env:create --scope project --environment production --environment preview -- EAS automatically injects project-scoped secrets into every step as process environment variables — **don't** reference them via `${{ secrets.X }}` in YAML (that syntax isn't supported by EAS Workflows). +## Cancelling superseded runs + +Every `dcd cloud` flag is forwarded verbatim, so `--cancel-previous` works +here with no wrapper support needed. It cancels the still-queued tests of the +previous run of this job on the same branch or PR: + +```yaml +- run: | + npx --yes @devicecloud.dev/eas-workflow@v1 \ + --app-file ${{ steps.download.outputs.artifact_path }} \ + --flows ./.maestro \ + --cancel-previous +``` + +The context comes from the `DCD_GH_*` env vars the job already sets, so +`DCD_GH_BRANCH` (or `DCD_GH_PR_NUMBER`) and `DCD_GH_REPO` must be present or +nothing is cancelled. Set `DCD_CHECK_NAME` per job when a commit runs this more +than once — it scopes the group, so without it the iOS job would cancel the +Android job's queued tests. + +Only queued tests are cancelled; anything already on a device finishes and +reports normally. Cancelled tests are refunded at 75%, and the superseded run +exits 0 rather than failing your workflow. + ## Documentation Full documentation including all environment variables, CLI flags, outputs, and migration notes: