Skip to content

Commit 390bfd0

Browse files
committed
Adding tmate for debugging
1 parent ec5ddfc commit 390bfd0

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

.github/workflows/build.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ name: build
22

33
on:
44
workflow_dispatch:
5+
inputs:
6+
debug_enabled:
7+
type: boolean
8+
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
9+
required: false
10+
default: false
511
push:
612
branches:
713
- master
@@ -70,6 +76,11 @@ jobs:
7076
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:test
7177
context: .
7278

79+
# Enable tmate debugging of manually-triggered workflows if the input option was provided
80+
- name: Setup tmate session
81+
uses: mxschmitt/action-tmate@v3
82+
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
83+
7384
- name: Test Docker image
7485
id: test-image
7586
run: |

0 commit comments

Comments
 (0)