Skip to content

Commit

Permalink
Fix: Terraform gh action (#45)
Browse files Browse the repository at this point in the history
* update base os

* enable manual healthcheck
  • Loading branch information
guyzsarun authored Jan 11, 2025
1 parent 66ac7db commit 27c00c0
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 31 deletions.
58 changes: 29 additions & 29 deletions .github/workflows/healthcheck.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
# name: healthcheck
name: healthcheck

# on:
# workflow_dispatch:
# schedule:
# - cron: "0 0 * * *"
on:
workflow_dispatch:
# schedule:
# - cron: "0 0 * * *"

# env:
# HOSTS: '
# proxmox:10.243.100.160
# '
env:
HOSTS: '
proxmox:10.243.100.160
'


# jobs:
# healthcheck:
# runs-on: ubuntu-latest
# timeout-minutes: 15
# steps:
# - name: zerotier login
# uses: zerotier/github-action@v1.0.1
# with:
# network_id: ${{ secrets.ZEROTIER_NETWORK_ID }}
# auth_token: ${{ secrets.ZEROTIER_CENTRAL_TOKEN }}
jobs:
healthcheck:
runs-on: ubuntu-latest
timeout-minutes: 15
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: |
# sleep 15 ;
# for lines in ${{ env.HOSTS }};
# do
# line=($(echo $lines | awk -F ':' '{print $1,$2}'))
# echo ${line[0]}
# ping -i 2 -W 4 -c 20 ${line[1]}
# done
- name: ping host
shell: bash
run: |
sleep 15 ;
for lines in ${{ env.HOSTS }};
do
line=($(echo $lines | awk -F ':' '{print $1,$2}'))
echo ${line[0]}
ping -i 2 -W 4 -c 20 ${line[1]}
done
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
run: "cd packer && packer validate ."

terraform:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3

Expand All @@ -59,7 +59,7 @@ jobs:
run: ${TERRAFORM_COMMAND} validate

tflint:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: terraform

steps:
Expand Down

0 comments on commit 27c00c0

Please sign in to comment.