From 99d35441e25167abdb8144dc1b645f3e95fb89c9 Mon Sep 17 00:00:00 2001 From: Philip Durbin Date: Wed, 22 May 2024 21:51:54 -0400 Subject: [PATCH] add debugging with tmate --- .github/workflows/maven-snapshot.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/maven-snapshot.yml b/.github/workflows/maven-snapshot.yml index d532263..5dfccd8 100644 --- a/.github/workflows/maven-snapshot.yml +++ b/.github/workflows/maven-snapshot.yml @@ -3,6 +3,13 @@ on: push: branches: - main + 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: publish: runs-on: ubuntu-latest @@ -34,3 +41,7 @@ jobs: env: MAVEN_USERNAME: ${{ secrets.DATAVERSEBOT_SONATYPE_USERNAME }} MAVEN_PASSWORD: ${{ secrets.DATAVERSEBOT_SONATYPE_TOKEN }} + # 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 }} \ No newline at end of file