From f8597b7a71fc136816d62ddd9241f6686bc5762a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20G=C3=BCnther?= Date: Fri, 26 Apr 2024 10:49:27 +0200 Subject: [PATCH] CI: Add tmate debugging This commit adds the option of running the GitHub workflow manually (workflow_dispatch) and optionally enable tmate for SSH debugging. --- .github/workflows/github-actions.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 2344c1e7..ce628c2d 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -1,5 +1,14 @@ name: Build and run ROS tests -on: [push, pull_request] +on: + push: + pull_request: + workflow_dispatch: + inputs: + debug_enabled: + type: boolean + description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' + required: false + default: false jobs: build: strategy: @@ -10,6 +19,12 @@ jobs: container: image: ros:${{ matrix.rosdistro }}-ros-core steps: + # Enable tmate debugging of manually-triggered workflows if the input option was provided + - name: Setup tmate session + uses: mxschmitt/action-tmate@v3 + if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }} + with: + detached: true - name: Install apt dependencies run: | apt-get update