diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 20b22478..70104466 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,6 +4,13 @@ on: paths-ignore: - "docs/**" - README.md + workflow_dispatch: + inputs: + debug_enabled: + type: boolean + description: 'Run the build with tmate session (https://github.com/marketplace/actions/debugging-with-tmate)' + required: false + default: false jobs: build: @@ -217,9 +224,6 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # - name: Setup "tmate" session - # uses: mxschmitt/action-tmate@v3 - - name: Wait for images if: contains(github.event.pull_request.body, '/build-new-image') uses: lewagon/wait-on-check-action@v1.3.1 @@ -244,6 +248,10 @@ jobs: KUBE_TAG: "${{ matrix.kube }}" NODE_COUNT: 2 + - name: Setup "tmate" session + if: github.event_name == 'workflow_dispatch' && inputs.debug_enabled && failure() + uses: mxschmitt/action-tmate@v3 + - name: Upload Sonobuoy results uses: actions/upload-artifact@v3 if: always()