Skip to content

update hosts

update hosts #3

Workflow file for this run

name: healthcheck
on:
workflow_dispatch:
push:
schedule:
- cron: "0 7 * * *"
env:
HOSTS: '
HOST1: 10.10.10.10
HOST2: 10.10.10.12
'
jobs:
healthcheck:
runs-on: ubuntu-latest
steps:
- name: zerotier login
uses: zerotier/github-action@v1.0.1
with:
network_id: ${{ secrets.ZEROTIER_NETWORK_ID }}
auth_token: ${{ secrets.ZEROTIER_CENTRAL_TOKEN }}
- name: ping host
shell: bash
run: |
echo ${{ env.HOSTS }} | while IFS=':' read i j ; do echo $i:$j ; done
# count=10
# while ! ping -c 1 ${{ env.HOSTS }} ; do
# echo "waiting..." ;
# sleep 1 ;
# let count=count-1
# done
# echo "ping success"