Skip to content

Commit 88a6aca

Browse files
ci: make tmate SSH session opt-in via workflow_dispatch input (#232)
- Add enable_tmate boolean input (default: false) to workflow_dispatch - Update all 3 tmate steps to only run when input is enabled AND failure occurs - Normal CI runs (push/PR) no longer trigger tmate on failure - Manual runs can enable tmate by checking the input when debugging is needed - Leave release.yml and version-bump.yml unchanged (rare failures, worth keeping) Co-authored-by: Cursor Agent <cursoragent@cursor.com>
1 parent 3e62d99 commit 88a6aca

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

.github/workflows/actions.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ on:
4141

4242
# Allows you to run this workflow manually from the Actions tab
4343
workflow_dispatch:
44+
inputs:
45+
enable_tmate:
46+
description: 'Enable tmate SSH session on failure'
47+
type: boolean
48+
default: false
4449

4550
jobs:
4651
set_build_datetime:
@@ -135,7 +140,7 @@ jobs:
135140
BUILD_ARCH: ${{ matrix.arch }}
136141

137142
- name: Setup tmate session
138-
if: ${{ failure() }}
143+
if: ${{ failure() && inputs.enable_tmate == true }}
139144
uses: mxschmitt/action-tmate@v3
140145
with:
141146
limit-access-to-actor: true
@@ -583,7 +588,7 @@ jobs:
583588
retention-days: 90
584589

585590
- name: Setup tmate session
586-
if: ${{ failure() }}
591+
if: ${{ failure() && inputs.enable_tmate == true }}
587592
uses: mxschmitt/action-tmate@v3
588593
with:
589594
limit-access-to-actor: true
@@ -855,7 +860,7 @@ jobs:
855860
test_runner_only: "true"
856861

857862
- name: Setup tmate session
858-
if: ${{ failure() }}
863+
if: ${{ failure() && inputs.enable_tmate == true }}
859864
uses: mxschmitt/action-tmate@v3
860865
with:
861866
limit-access-to-actor: true

0 commit comments

Comments
 (0)