ci: add github actions debugging with tmate

Usage is to run a workflow manually with debug_enabled on.

https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow#running-a-workflow
https://github.com/marketplace/actions/debugging-with-tmate
This commit is contained in:
evazion
2021-09-06 03:59:11 -05:00
parent 3202ec8b9a
commit 661368bdcf

View File

@@ -8,6 +8,12 @@ on:
pull_request:
branches:
- master
workflow_dispatch:
inputs:
debug_enabled:
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
required: false
default: false
jobs:
# Build Docker image and push to Github Container Registry.
@@ -139,5 +145,13 @@ jobs:
- name: Prepare database
run: config/docker/prepare-tests.sh
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
timeout-minutes: 10
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }}
with:
limit-access-to-actor: true
sudo: false
- name: Run tests
run: bin/rails test