Skip to content

Commit bf021e6

Browse files
authored
ci: add option to skip cleanup in ai triage workflow (#20031)
Now that we are creating the workspaces as the triggering user, it's more ergonomic to allow the workspace owner to review the task on completion.
1 parent 8cfa2c4 commit bf021e6

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

.github/workflows/traiage.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ on:
2222
required: false
2323
default: "traiage"
2424
type: string
25+
cleanup:
26+
description: "Cleanup workspace after triage."
27+
required: false
28+
default: false
29+
type: boolean
2530

2631
jobs:
2732
traiage:
@@ -126,6 +131,7 @@ jobs:
126131
127132
- name: Create and upload archive
128133
id: create-archive
134+
if: inputs.cleanup
129135
env:
130136
BUCKET_PREFIX: "gs://coder-traiage-outputs/traiage"
131137
run: |
@@ -135,6 +141,7 @@ jobs:
135141
136142
- name: Generate a summary of the changes and post a comment on GitHub.
137143
id: generate-summary
144+
if: inputs.cleanup
138145
env:
139146
ARCHIVE_URL: ${{ steps.create-archive.outputs.archive_url }}
140147
BUCKET_PREFIX: "gs://coder-traiage-outputs/traiage"
@@ -172,7 +179,7 @@ jobs:
172179
cat "${SUMMARY_FILE}" >> "${GITHUB_STEP_SUMMARY}"
173180
174181
- name: Cleanup task
175-
if: steps.create-task.outputs.TASK_NAME != '' && steps.create-archive.outputs.archive_url != ''
182+
if: inputs.cleanup && steps.create-task.outputs.TASK_NAME != '' && steps.create-archive.outputs.archive_url != ''
176183
run: |
177184
echo "Cleaning up task: $TASK_NAME"
178185
./scripts/traiage.sh delete || true

0 commit comments

Comments
 (0)