Skip to content

Commit bba0fea

Browse files
carmo-danielclaude
andcommitted
Add manual workflow to trigger Datadog RCA bot
Manually-dispatched GitHub Actions workflow that POSTs to the Datadog Workflow Automation API to launch a root-cause-analysis bot for a given CI run/job URL. Includes a temporary push trigger for branch testing (to be removed before merge). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 6410d22 commit bba0fea

1 file changed

Lines changed: 16 additions & 3 deletions

File tree

.github/workflows/analyze-ci-failure.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,18 @@ on:
1818
default: "feb92c49-f433-48b0-954c-7ccde4a80338"
1919
type: string
2020

21+
# ─── TEMPORARY: delete this whole `push:` block before merging ───
22+
# Lets you test THIS branch's version of the workflow without it first
23+
# being on the default branch. Push to the branch named below and the job
24+
# runs using the fallback CI_URL / WORKFLOW_ID in the job env (push events
25+
# carry no inputs). Rename the branch here to match the one you push.
26+
push:
27+
branches:
28+
- danielcarmo/ci-root-cause-analysis
29+
paths:
30+
- .github/workflows/analyze-ci-failure.yml
31+
# ─── END TEMPORARY ───
32+
2133
jobs:
2234
trigger-datadog-workflow:
2335
name: Trigger Datadog workflow
@@ -27,9 +39,10 @@ jobs:
2739
env:
2840
DD_API_KEY: ${{ secrets.DD_API_KEY }}
2941
DD_APP_KEY: ${{ secrets.DD_APPLICATION_KEY }}
30-
CI_URL: ${{ inputs.ci_url }}
31-
INPUT_PROMPT: ${{ inputs.prompt }}
32-
WORKFLOW_ID: ${{ inputs.workflow_id }}
42+
# On push events there are no inputs, so fall back to test defaults.
43+
CI_URL: ${{ (github.event_name == 'workflow_dispatch' && inputs.ci_url) || 'https://github.com/DataDog/system-tests/actions/runs/26634388026' }}
44+
INPUT_PROMPT: ${{ (github.event_name == 'workflow_dispatch' && inputs.prompt) || '' }}
45+
WORKFLOW_ID: ${{ (github.event_name == 'workflow_dispatch' && inputs.workflow_id) || 'feb92c49-f433-48b0-954c-7ccde4a80338' }}
3346
run: |
3447
set -euo pipefail
3548

0 commit comments

Comments
 (0)