From 2c2e852551534d4bc5653ca0e18e4ab9f459d380 Mon Sep 17 00:00:00 2001 From: patrick Date: Tue, 23 Jun 2026 12:00:50 +0200 Subject: [PATCH] fix(cd): create 'automated' label before back-merge PR to avoid failure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The post-release back-merge job runs `gh pr create --label automated`, but the label does not exist in the repo. `gh pr create` validates labels before creating the PR, so the whole step failed ("could not add label: 'automated' not found") on every release — the back-merge branch was pushed but no PR was opened, leaving develop behind on version metadata. Create the label idempotently right before the PR is opened. Keeps the `automated` label semantics (useful for filtering tooling PRs) while removing the failure mode; real `gh pr create` errors still surface. Observed on the icm-v0.10.54 release. Co-Authored-By: Claude Opus 4.8 --- .github/workflows/cd.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 731a8e3..a0c4746 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -209,6 +209,14 @@ jobs: git push origin "$BRANCH" + # Ensure the 'automated' label exists before referencing it: a missing + # label makes `gh pr create --label` fail and aborts the back-merge PR + # ("could not add label: 'automated' not found"). Idempotent. + gh label create automated \ + --color ededed \ + --description "Automated PR (back-merge / release tooling)" \ + 2>/dev/null || true + gh pr create \ --base develop \ --head "$BRANCH" \