Skip to content

test

test #25

Workflow file for this run

name: Check Hostname
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
check-hostname:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, macos-15]
steps:
- uses: actions/checkout@v3
- name: Dump /etc/hosts
run: cat /etc/hosts
- name: Checks
run: |
set -x
scutil —-get ComputerName # the ”friendly” name
scutil —-get LocalHostName # the Bonjour / mDNS / ZeroConf host name
scutil —-get HostName # should be the same as what hostname command returns
- name: Run hostname check script
run: |
set -x
echo "Hostname: $(hostname)"
echo "Fully Qualified Domain Name: $(hostname -f)"
echo "Pinging localhost..."
ping -c 1 localhost
echo "Pinging hostname..."
ping -c 1 $(hostname)
echo "Pinging FQDN..."
ping -c 1 $(hostname -f)