From 518293a402f9ff9ae7dc893a3a7fd169c42e12b2 Mon Sep 17 00:00:00 2001 From: Naamane Yanis Date: Tue, 8 Sep 2026 22:47:57 +0200 Subject: [PATCH] Restore the release actor lookup the failure notice references #4982 deleted the extract-release-actor job and the docs dispatch it fed, but left the Slack failure notice reading its output, so the notice silently falls back to github.actor (the release GitHub App, not a person) since the property is always undefined. Re-add the job, reading github.event.release.body through env: with no token and no checkout, avoiding the original's gh release view call that interpolated github.ref_name into run: (the injection shape already removed elsewhere in this file). Keep only the first Release-Triggered-By comment: a second one (for example folded in from a merged PR title by --generate-notes) would otherwise write a two-line value to GITHUB_OUTPUT, fail this job, and since it now sits in notify-release-failure's needs, fire a false alert on a release that actually succeeded. Log when no comment is found so a missing match is visible instead of silent. Signed-off-by: Naamane Yanis --- .github/workflows/releaser.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.github/workflows/releaser.yml b/.github/workflows/releaser.yml index abd0bf4991..8877465d9e 100644 --- a/.github/workflows/releaser.yml +++ b/.github/workflows/releaser.yml @@ -344,9 +344,32 @@ jobs: # "$fn" # done <<<"$checksums" + extract-release-actor: + name: Extract Release Actor + runs-on: ubuntu-slim + permissions: {} + outputs: + triggered_by: ${{ steps.extract.outputs.triggered_by }} + steps: + - name: Extract actor from release body + id: extract + env: + RELEASE_BODY: ${{ github.event.release.body }} + run: | + # create-release-tag.yml embeds this HTML comment in the release notes; parse it back out here. + # head -n 1 keeps only the first match: a second Release-Triggered-By comment + # (for example from a merged PR title folded into --generate-notes) must not + # turn this into a multi-line GITHUB_OUTPUT write. + TRIGGERED_BY=$(echo "$RELEASE_BODY" | grep -oP '(?<=)' | head -n 1 || true) + if [ -z "$TRIGGERED_BY" ]; then + echo "No Release-Triggered-By comment in the release notes; the notice will fall back to github.actor." + fi + echo "triggered_by=$TRIGGERED_BY" >> "$GITHUB_OUTPUT" + notify-release-failure: name: Notify Release Failure needs: + - extract-release-actor - compute-build-flags - release-binaries - image-build-and-push