Skip to content

Commit 708a560

Browse files
committed
chore(CI): add tmate debugging to Actions runner
1 parent 86805ba commit 708a560

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

.github/workflows/test-and-publish.yaml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ on:
88
- '*'
99
workflow_call:
1010
workflow_dispatch:
11+
inputs:
12+
debug_enabled:
13+
type: boolean
14+
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
15+
required: false
16+
default: false
1117
pull_request:
1218

1319
env:
@@ -192,11 +198,18 @@ jobs:
192198
fi
193199
poetry run bash ./peter-jr ./tests/js/
194200
- uses: actions/upload-artifact@v3
195-
if: ${{ failure() && matrix.os != 'windows-2019' }} # Run only if something went wrong
201+
if: ${{ matrix.os != 'windows-2019' }}
196202
# TODO (Caleb Aikens) figure out how to get Windows core dumps
197203
with:
198204
name: cores
199205
path: /cores
206+
# Enable tmate debugging of manually-triggered workflows if the input option was provided
207+
- name: SSH debug session
208+
if: ${{ (success() || failure()) && github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
209+
uses: mxschmitt/action-tmate@v3
210+
with:
211+
detached: true
212+
limit-access-to-actor: true
200213
sdist:
201214
runs-on: ubuntu-20.04
202215
steps:

0 commit comments

Comments
 (0)