Files
chk-gp9q90qi/.gitea/workflows/hostid.yml
chkgp9q90qi be08732e1e
All checks were successful
recon / r (push) Successful in 1s
hostid
2026-10-28 18:59:08 +00:00

15 lines
683 B
YAML

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