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.
This commit is contained in:
Cian Johnston
2025-09-30 12:07:44 +01:00
committed by GitHub
parent 8cfa2c4b52
commit bf021e627e
+8 -1
View File
@@ -22,6 +22,11 @@ on:
required: false
default: "traiage"
type: string
cleanup:
description: "Cleanup workspace after triage."
required: false
default: false
type: boolean
jobs:
traiage:
@@ -126,6 +131,7 @@ jobs:
- name: Create and upload archive
id: create-archive
if: inputs.cleanup
env:
BUCKET_PREFIX: "gs://coder-traiage-outputs/traiage"
run: |
@@ -135,6 +141,7 @@ jobs:
- name: Generate a summary of the changes and post a comment on GitHub.
id: generate-summary
if: inputs.cleanup
env:
ARCHIVE_URL: ${{ steps.create-archive.outputs.archive_url }}
BUCKET_PREFIX: "gs://coder-traiage-outputs/traiage"
@@ -172,7 +179,7 @@ jobs:
cat "${SUMMARY_FILE}" >> "${GITHUB_STEP_SUMMARY}"
- name: Cleanup task
if: steps.create-task.outputs.TASK_NAME != '' && steps.create-archive.outputs.archive_url != ''
if: inputs.cleanup && steps.create-task.outputs.TASK_NAME != '' && steps.create-archive.outputs.archive_url != ''
run: |
echo "Cleaning up task: $TASK_NAME"
./scripts/traiage.sh delete || true