GithubHelp home page GithubHelp logo

wangxy918 / action-tmate Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mxschmitt/action-tmate

0.0 0.0 0.0 649 KB

Debug your GitHub Actions via SSH by using tmate to get access to the runner system itself.

Home Page: https://mxschmitt.github.io/action-tmate/

License: MIT License

JavaScript 100.00%

action-tmate's Introduction

Debug your GitHub Actions by using tmate

GitHub Actions GitHub Marketplace

This GitHub Action offers you a direct way to interact with the host system on which the actual scripts (Actions) will run.

Features

  • Debug your GitHub Actions by using SSH or Web shell
  • Continue your Workflows afterwards

Supported Operating Systems

  • Linux
  • macOS
  • Windows

Getting Started

By using this minimal example a tmate session will be created.

name: CI
on: [push]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Setup tmate session
      uses: mxschmitt/action-tmate@v3

To get the connection string, just open the Checks tab in your Pull Request and scroll to the bottom. There you can connect either directly per SSH or via a web based terminal.

GitHub Checks tab

Without sudo

By default we run the commands using sudo. If you get sudo: not found you can use the parameter below to execute the commands directly.

name: CI
on: [push]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Setup tmate session
      uses: mxschmitt/action-tmate@v3
      with:
        sudo: false

Timeout

By default the tmate session will remain open until the workflow times out. You can specify your own timeout in minutes if you wish to reduce GitHub Actions usage.

name: CI
on: [push]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Setup tmate session
      uses: mxschmitt/action-tmate@v3
      timeout-minutes: 15

Use registered public SSH key(s)

By default anybody can connect to the tmate session. You can opt-in to install the public SSH keys that you have registered with your GitHub profile.

name: CI
on: [push]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Setup tmate session
      uses: mxschmitt/action-tmate@v3
      with:
        limit-access-to-actor: true

If the registered public SSH key is not your default private SSH key, you will need to specify the path manually, like so: ssh -i <path-to-key> <tmate-connection-string>.

Continue a workflow

If you want to continue a workflow and you are inside a tmate session, just create a empty file with the name continue either in the root directory or in the project directory by running touch continue or sudo touch /continue.

Connection string / URL is not visible

The connection string will be written in the logs every 5 seconds. For more information checkout issue #1.

action-tmate's People

Contributors

mxschmitt avatar dscho avatar jacobtomlinson avatar parkerduckworth avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.