mxschmitt / action-tmate

Debug your GitHub Actions via SSH by using tmate to get access to the runner system itself.
https://mxschmitt.github.io/action-tmate/
MIT License
2.93k stars 287 forks source link

documentation on how to run ssh for only job in a matrix #121

Open KrisThielemans opened 2 years ago

KrisThielemans commented 2 years ago

I'd like to be able to specify how which job of my matrix needs to open an ssh shell, as I can't really debug all of them at the same time 😄 . Is that possible at all?

Here's my current Actions yml, just in case that helps.

thanks!

paw-lu commented 2 years ago

Admitedly haven't tried it, but likely you could specify it in your if statement to match the specfic matrix values?

    - name: Setup tmate session
        uses: mxschmitt/action-tmate@v3
        if: ${{ maxtrix.compiler == 'gcc' && matrix.os == 'macOS-latest' }}
dejayc commented 1 year ago

Admitedly haven't tried it, but likely you could specify it in your if statement to match the specfic matrix values?

Thanks for this, I'm new to all this and your answer helped me to debug something!