Giter Club home page Giter Club logo

runner_info's Introduction

Runner_Info

This action returns diagnostic information about your self-hosted Linux runner running on an AWS EC2 instance.

Examples

Return basic diagnostic information

on:
  push:

name: "Trigger: Push action"
permissions:
  contents: read

jobs:
  shellcheck:
    name: Shellcheck
    runs-on: [ my-private-runner ]
    steps:
      - uses: actions/checkout@v3
      - name: Gather runner diagnostic info
        uses: bwhitehead0/runner_info@v1
        with:
          detail-level: short # optional, full or short, default short
      - name: Run ShellCheck
        uses: bwhitehead0/action-shellcheck@master

Returns:

OS: Amazon Linux 2023
OS Version: 2023.3.20240219-0
Uptime: 116:02:48:08
Runner Version: 2.304.0
accountId: 123412341234
architecture: arm64
instanceId: i-123xy54321abcd0z1
instanceType: m6g.xlarge
privateIp: 10.16.20.169
region: us-east-1

Return extended diagnostic information

...
      - name: Gather runner diagnostic info
        uses: bwhitehead0/runner_info@v1
        with:
          detail-level: full # optional, full or short, default short
...

Returns:

OS: Amazon Linux 2023
OS Version: 2023.3.20240219-0
Uptime: 116:02:48:08
Kernel Version: 6.1.77-99.164.amzn2023.aarch64
OS Hostname: private-runner01
Runner User: runner-user
Runner Path: /home/runner-user/actions-runner
Runner Disk Used: 1%
Root Disk Used: 7%
Runner Version: 2.304.0
Account ID: 123412341234
Architecture: arm64
Instance ID: i-123xy54321abcd0z1
Instance Type: m6g.xlarge
Private Ip: 10.16.20.169
Region: us-east-1

Roadmap

  • Return common build tool and language versions (go, node, maven, java, python, gcc, etc)
  • Return other tool versions, which might be used commonly in CI/CD workflows (gitleaks, shellcheck, jq, curl, aws cli, ansible, terraform, etc)
  • Simple JSON output option
  • Save as job artifact to github
  • User input for cloud provider, return comparable instance details across providers.
  • Accept list of tag key names as input to retrieve from instance metadata endpoint, if available (see this link for more info)

runner_info's People

Contributors

bwhitehead0 avatar

Stargazers

 avatar

Watchers

 avatar

runner_info's Issues

runner disk and process not found properly when running multiple runners on single host

revisit how we determine the process for the runner executing the workflow:

  • to determine the disk the binary is installed on
  • to determine the runner version
  • to determine the disk usage for the disk

as part of this fix, probably should revisit all commands and add better error handling around each so they return "" instead of error output, or something besides a failed command.

Specify linux in readme

The following line should specify Linux OS for runner:

This action returns diagnostic information about your self-hosted runner running on an AWS EC2 instance.

Normalize casing and naming for metadata key names returned from AWS IMDS

Everything else is Title Case, but the data returned from IMDS is camelCase:

accountId: 123412341234
architecture: arm64
instanceId: i-123xy54321abcd0z1
instanceType: m6g.xlarge
privateIp: 10.16.20.169
region: us-east-1

We should at least convert the first letter to upper case if not rename the key altogether.

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.