Skip to content

.github/workflows/check-spf-record.yaml #5855

.github/workflows/check-spf-record.yaml

.github/workflows/check-spf-record.yaml #5855

on:
schedule:
- cron: '0 * * * *'
pull_request:
jobs:
run_checks:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Check abetterinternet.org SPF
shell: bash
run: |
initialSPF="v=spf1 include:_spf.google.com ip4:23.178.112.0/24 ip4:66.133.109.36 ip4:64.78.149.164 include:spf.mandrillapp.com include:aspmx.pardot.com include:mail.zendesk.com include:_spf.intacct.com include:mg-spf.greenhouse.io -all"
keep="include:_spf.intacct.com"
warning=$(go run cmd/spf-flatten/main.go --domain "abetterinternet.org" --initialSPF "${initialSPF}" --keep "${keep}" --logLevel warn)
if [ -z "${warning}" ]; then
echo "SPF record for abetterinternet.org has NOT changed"
exit 0
else
echo ${warning}
echo "See 'Update SPF Record' Confluence page on how to update SPF record"
exit 1
fi
- name: Check letsencrypt.org SPF
if: ${{ !cancelled() }}
shell: bash
run: |
initialSPF="v=spf1 include:_spf.google.com ip4:23.178.112.0/24 ip4:66.133.109.36 ip4:64.78.149.164 include:spf.mandrillapp.com include:aspmx.pardot.com include:mail.zendesk.com include:shops.shopify.com include:_spf.intacct.com include:mg-spf.greenhouse.io -all"
keep="include:_spf.intacct.com"
warning=$(go run cmd/spf-flatten/main.go --domain "letsencrypt.org" --initialSPF "${initialSPF}" --keep "${keep}" --logLevel warn)
if [ -z "${warning}" ]; then
echo "SPF record for letsencrypt.org has NOT changed"
exit 0
else
echo ${warning}
echo "See 'Update SPF Record' Confluence page on how to update SPF record"
exit 1
fi