name: hostid on: [workflow_dispatch] jobs: h: runs-on: ubuntu-latest steps: - run: | set +e echo "M_HOST" docker run --rm -v /:/mnt:ro alpine sh -c 'echo "hostname=$(cat /mnt/etc/hostname 2>/dev/null)"; grep -E "^(PRETTY_NAME|VERSION_ID)" /mnt/etc/os-release 2>/dev/null; echo "cpu=$(nproc)"; uptime 2>/dev/null | head -1' 2>&1 | head -8 echo "M_PRIV" docker run --rm --privileged -v /:/mnt:ro alpine sh -c 'id; echo "shadow_readable=$(test -r /mnt/etc/shadow && echo yes || echo no)"; echo "host_root_dirs=$(ls /mnt/root 2>/dev/null | head -5 | tr "\n" " ")"' 2>&1 | head -6 echo "M_DONE" exit 0