Re:Work with GitHub Actions in Your Terminal with GitHub CLI
by karlicoss on Thursday April 15, 2021 @01:56PM
(#26823921)
Yeah, the only downside of tmate is that you need to add/uncomment the line with it, push, then remove the commit again.
It's much nicer in circleci, for example where you can simply rerun wish SSH in a button click. Even better would be if the VM was around for a bit after failing, so I could connect and inspect the state without rerunning at all.
Re:Work with GitHub Actions in Your Terminal with GitHub CLI
by horse666 on Thursday April 15, 2021 @03:47PM
(#26825298)
One approach to avoid this karlicoss is to add a “workflow dispatch” section to the “on” events in the workflow:
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
Then under the job steps, make the debug step conditional on that optional flag: # 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 }}
You then can just trigger the build on the required branch, setting debug_enabled to true and voila.Edit: but agree the CircleCI interface is nicer where you can just run a debug build with ssh access directly.
Re:Work with GitHub Actions in Your Terminal with GitHub CLI
by karlicoss on Thursday April 15, 2021 @04:27PM
(#26825701)
oh, nice trick, thanks!
Re:Work with GitHub Actions in Your Terminal with GitHub CLI
by horse666 on Saturday April 17, 2021 @01:12PM
(#26845797)
Thought I'd get their docs updated - https://github.com/mxschmitt/action-tmate#manually-triggered...
Re:Work with GitHub Actions in Your Terminal with GitHub CLI
by degraafc on Thursday April 15, 2021 @02:14PM
(#26824193)
Yep, definitely agree. I feel like there are a lot of areas that GitHub Actions needs improvements to catch up to other CI providers, really basic-seeming stuff like "allow failure" support and so on.
Re:Work with GitHub Actions in Your Terminal with GitHub CLI
by jrochkind1 on Thursday April 15, 2021 @01:29PM
(#26823549)
action-tmate... woah!
[1]: https://github.com/mxschmitt/action-tmate [2]: https://github.com/nektos/act