Skip to content

wozniakpl/debug-info-action

Repository files navigation

Runner Debug Info Action

A drop-in GitHub Action that prints detailed CI runner debug information at the current workflow step. Easy to use as a 1-liner in any workflow and supports Ubuntu, Windows, and macOS runners.

Features

  • Multi-OS Support: Works on ubuntu-latest, windows-latest, and macos-latest
  • Rich Debug Info: Comprehensive system information including OS, CPU, RAM, disk, network, and more
  • No Dependencies: Uses only built-in OS tools and Python 3 (standard on all GitHub runners)
  • Local Testing: Works with act for local development

Usage

Basic Usage (1-liner)

- uses: wozniakpl/debug-info-action@main

Complete Example

name: Debug Workflow

on: [push, pull_request]

jobs:
  debug:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Print Debug Info
        uses: wozniakpl/debug-info-action@main

      - name: Your other steps
        run: echo "Your workflow continues..."

Output Sections

The action outputs the following information in collapsible groups:

All Platforms

  • OS + Kernel Info: OS version, kernel version, uptime
  • CPU + RAM Info: CPU details, memory statistics
  • Disk Usage: Filesystem usage and available space
  • Filesystem Layout + Mounts: Mount points and top-level directories
  • Resource Limits: Process limits (ulimits on Linux/macOS)
  • Network Info: IP addresses, routes, DNS configuration, resolution tests
  • Runtime Environment: GitHub Actions environment variables, workspace paths
  • Toolchain Info: Available shells, core utilities, build tools

Linux-Specific

  • Cgroup/Container Context: Container detection, cgroup information

Windows-Specific

  • Container Context: Docker detection, container environment hints

Sample Output

▶ OS + Kernel Info
--- /etc/os-release ---
NAME="Ubuntu"
VERSION="22.04.3 LTS (Jammy Jellyfish)"
...

▶ CPU + RAM Info
--- CPU Info ---
model name      : Intel(R) Xeon(R) CPU @ 2.30GHz
processor       : 0
cpu cores       : 2
...

▶ Disk Usage
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        84G   15G   65G  19% /
...

Security

GitHub Actions automatically masks secrets and sensitive values in workflow logs. This action relies on GitHub's built-in secret masking.

Important: Always review your workflow logs before sharing them publicly. Never commit secrets to your repository. Use GitHub Secrets for sensitive values.

OS Differences

Linux (ubuntu-latest)

  • Uses /proc filesystem for system information
  • Shows cgroup information for container detection
  • Uses ip or ifconfig for network info
  • Reads /etc/resolv.conf for DNS

Windows (windows-latest)

  • Uses PowerShell cmdlets via Python subprocess (Get-CimInstance, Get-ComputerInfo)
  • Shows Windows-specific system information
  • Uses Get-NetIPAddress and Resolve-DnsName for network info
  • Displays logical drives and volumes

macOS (macos-latest)

  • Uses sw_vers for OS version
  • Uses sysctl for system information
  • Uses scutil for DNS configuration
  • Similar to Linux but with macOS-specific tools

Local Testing with Act

This action can be tested locally using act:

# Install act (if not already installed)
# macOS: brew install act
# Linux: See https://github.com/nektos/act#installation

# Run the CI workflow locally
make act

Note: act primarily supports Linux containers. Windows and macOS-specific features may not work perfectly in local testing, but the action will still execute.

Development

Linting

# Run linters
make lint

# Or manually check the Python script:
python3 -m py_compile scripts/debug-info.py
python3 -m pylint scripts/debug-info.py  # if installed

Makefile Targets

  • make lint - Run linters
  • make act - Run CI workflow locally with act

Contributing

Contributions are welcome! Please ensure:

  1. Code follows existing style
  2. Security filtering is maintained
  3. Documentation is updated
  4. CI verification passes on all supported platforms

License

MIT

About

A drop-in GitHub Action that outputs detailed debug info at the current workflow step: runner OS/kernel, CPU/RAM, disk usage + filesystem/mounts, ulimits/resource limits, container/cgroup context, network/DNS basics, and key env/workspace/tooling details - for quick troubleshooting of CI runner issues.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors