Skip to content

healthchecks.io pings #1555

healthchecks.io pings

healthchecks.io pings #1555

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: healthchecks.io pings
on:
workflow_dispatch:
schedule:
- cron: '3 * * * *'
jobs:
code-email:
runs-on: ubuntu-latest
steps:
- run: |
_mailhost="$(dig mx solvaholic.com +short | awk 'NR==1 {print$2}')"
echo "_mailhost=\"$_mailhost\"" >> "$GITHUB_ENV"
- name: Confirm [email protected] exists
run: |
_result=1
for _attempt in {1..3}; do
echo "EHLO solvaholic.com
MAIL FROM: [email protected]
RCPT TO: [email protected]
QUIT" | nc ${{ env._mailhost }} 25 | grep -qsF "250 2.1.5 Ok"
_result="$?"
[ "$_result" = "0" ] && break
done
echo "Result: $_result"
echo "_result=\"$_result\"" >> "$GITHUB_ENV"
- name: Ping healthchecks.io
env:
HC_URL: ${{ secrets.HC_URL_CODE_AT_SOLVAHOLIC_DOT_COM }}
run: |
if [ "${{ env._result }}" = "0" ]; then
curl -fsS -m 10 --retry 5 -o /dev/null "$HC_URL"
fi