Skip to content

Commit 31a9248

Browse files
committed
CI: Add tmate debugging
This commit adds the option of running the GitHub workflow manually (workflow_dispatch) and optionally enable tmate for SSH debugging.
1 parent 93e6d13 commit 31a9248

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

.github/workflows/github-actions.yml

+16-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
name: Build and run ROS tests
2-
on: [push, pull_request]
2+
on:
3+
push:
4+
pull_request:
5+
workflow_dispatch:
6+
inputs:
7+
debug_enabled:
8+
type: boolean
9+
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
10+
required: false
11+
default: false
312
jobs:
413
build:
514
strategy:
@@ -9,6 +18,12 @@ jobs:
918
container:
1019
image: ros:${{ matrix.rosdistro }}-ros-core
1120
steps:
21+
# Enable tmate debugging of manually-triggered workflows if the input option was provided
22+
- name: Setup tmate session
23+
uses: mxschmitt/action-tmate@v3
24+
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
25+
with:
26+
detached: true
1227
- name: Install apt dependencies
1328
run: |
1429
sudo apt-get update

0 commit comments

Comments
 (0)