Skip to content

Commit

Permalink
CI: add a workflow option for tmate debugging
Browse files Browse the repository at this point in the history
Signed-off-by: Sven Anderson <sven@redhat.com>
  • Loading branch information
ansiwen committed Nov 10, 2023
1 parent 2852a13 commit faac699
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ on:
- 'pr/**'
schedule:
- cron: 1 1 * * *
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:
# Determine the latest go versions
Expand Down Expand Up @@ -78,6 +85,10 @@ jobs:
- uses: actions/checkout@v4
- name: Run tests
run: make test-containers-test "CEPH_VERSION=${{ matrix.ceph_version }}" "GO_VERSION=${{ matrix.go_version }}" "RESULTS_DIR=$PWD/_results"
# 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 }}
- name: Clean up test containers
run: make test-containers-clean "CEPH_VERSION=${{ matrix.ceph_version }}"
- name: Archive test results
Expand Down

0 comments on commit faac699

Please sign in to comment.