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 16, 2023
1 parent fa8e6c8 commit 6682a3d
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 @@ -80,6 +87,10 @@ jobs:
run: sudo bash -c 'echo "core" > /proc/sys/kernel/core_pattern'
- 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
if: always()
run: make test-containers-clean "CEPH_VERSION=${{ matrix.ceph_version }}"
Expand Down

0 comments on commit 6682a3d

Please sign in to comment.