Skip to content

Commit 1d9c6d1

Browse files
authored
ci: avoid duplicate release-note failure issues (#265)
1 parent b698fe3 commit 1d9c6d1

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

.github/workflows/release-note-to-docs-pr.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,12 @@ jobs:
167167
env:
168168
GH_TOKEN: ${{ secrets.CROSS_REPO_PAT }}
169169
run: |
170+
if [ -f "${RUNNER_TEMP}/release-note-failure-notified" ]; then
171+
echo "Release-note runner already posted failure notification:"
172+
cat "${RUNNER_TEMP}/release-note-failure-notified"
173+
exit 0
174+
fi
175+
170176
NOTE_PATH="${{ steps.inputs.outputs.note_path || inputs.path || inputs.release_note_url || github.event.client_payload.path || github.event.client_payload.release_note_url }}"
171177
NOTE_URL="${{ steps.inputs.outputs.source_note_url || inputs.release_note_url || github.event.client_payload.release_note_url }}"
172178
RUN_URL="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"

scripts/release-notes/run-release-note-pipeline.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ DRY_RUN="${PIPELINE_DRY_RUN:-false}"
2323
MODEL="${PIPELINE_MODEL:-claude-opus-4-8}"
2424
RUN_URL="${RUN_URL:-}"
2525
SLACK_WEBHOOK_URL="${SLACK_WEBHOOK_URL:-}"
26+
FAILURE_NOTIFIED_FILE="${FAILURE_NOTIFIED_FILE:-${RUNNER_TEMP:-/tmp}/release-note-failure-notified}"
2627
DOCS_ROOT="$PWD"
2728

2829
case "$MODE" in
@@ -324,6 +325,12 @@ Rerun with release_note_url: $(source_note_url)
324325
else
325326
create_issue "release-note pipeline failed: ${NOTE_PATH}" "$body"
326327
fi
328+
329+
mkdir -p "$(dirname "$FAILURE_NOTIFIED_FILE")"
330+
{
331+
printf 'notified_at=%s\n' "$(date -u '+%Y-%m-%dT%H:%M:%SZ')"
332+
printf 'stage=%q\n' "$stage"
333+
} > "$FAILURE_NOTIFIED_FILE"
327334
}
328335

329336
checkout_branch() {

0 commit comments

Comments
 (0)