From bf021e627e51536f9712b08d882c6208d7eb2720 Mon Sep 17 00:00:00 2001 From: Cian Johnston Date: Tue, 30 Sep 2025 12:07:44 +0100 Subject: [PATCH] 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. --- .github/workflows/traiage.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/traiage.yaml b/.github/workflows/traiage.yaml index 87b7897582..615c5bec19 100644 --- a/.github/workflows/traiage.yaml +++ b/.github/workflows/traiage.yaml @@ -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