Skip to content

Commit 3bf3932

Browse files
committed
CI: Add tmate debugging (#179)
This commit adds the option of running the GitHub workflow manually (workflow_dispatch) and optionally enable tmate for SSH debugging.
1 parent 218a115 commit 3bf3932

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:
@@ -10,6 +19,12 @@ jobs:
1019
container:
1120
image: ros:${{ matrix.rosdistro }}-ros-core
1221
steps:
22+
# Enable tmate debugging of manually-triggered workflows if the input option was provided
23+
- name: Setup tmate session
24+
uses: mxschmitt/action-tmate@v3
25+
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
26+
with:
27+
detached: true
1328
- name: Install apt dependencies
1429
run: |
1530
sudo apt-get update

0 commit comments

Comments
 (0)