Skip to content

Commit

Permalink
Git Workflow: Add action-tmate to mac git workflow
Browse files Browse the repository at this point in the history
This GitHub Action offers us a direct way to interact with the
host system on which the actual scripts (Actions) will run. It
will help us to debug a failure with ssh on the target runner like
we used to do with circle CI.

- https://github.com/mxschmitt/action-tmate
- https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow
  • Loading branch information
praveenkumar committed Apr 28, 2022
1 parent be1af25 commit cc22006
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/macos-installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ on:
- "main"
- "old-main"
pull_request: {}
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:
runs-on: ${{ matrix.os }}
Expand All @@ -17,6 +23,13 @@ jobs:
go:
- 1.16
steps:
# 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' && github.event.inputs.debug_enabled }}
with:
limit-access-to-actor: true
timeout-minutes: 30
- name: Check out repository code
uses: actions/checkout@v2
- name: Set up Go
Expand Down

0 comments on commit cc22006

Please sign in to comment.