name: Runner Probe

on:
  workflow_dispatch:

jobs:
  probe:
    runs-on: ubuntu-latest

    steps:
      - name: Runner labels and OS
        run: |
          echo "=== OS ==="
          uname -a
          cat /etc/os-release 2>/dev/null || true

      - name: Python versions
        run: |
          echo "=== Python ==="
          which python3 && python3 --version || echo "python3 not found"
          which python && python --version || echo "python not found"
          ls /usr/bin/python* 2>/dev/null || true

      - name: Node versions
        run: |
          echo "=== Node ==="
          which node && node --version || echo "node not found"
          which npm && npm --version || echo "npm not found"
          ls /usr/bin/node* 2>/dev/null || true
          ls ~/.nvm/versions/node/ 2>/dev/null || echo "no nvm versions"

      - name: Docker
        run: |
          echo "=== Docker ==="
          which docker && docker --version || echo "docker not found"
          docker info 2>/dev/null | grep -E "Server Version|Operating System" || true

      - name: User and home
        run: |
          echo "=== User ==="
          whoami
          echo "HOME=$HOME"
          echo "PATH=$PATH"
