Skip to content
This repository was archived by the owner on Oct 24, 2025. It is now read-only.

Cleanup DNS Zones

Cleanup DNS Zones #255

name: "Cleanup DNS Zones"
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
jobs:
cleanup:
runs-on: ubuntu-latest
steps:
- name: Cleanup DNS Zones
env:
HETZNER_DNS_TOKEN: ${{ secrets.HETZNER_DNS_API_TOKEN }}
run: |
curl "https://dns.hetzner.com/api/v1/zones" -H "Auth-Api-Token: ${HETZNER_DNS_TOKEN}" -s | jq -r '.zones[] | .id' | xargs -I {} curl -XDELETE "https://dns.hetzner.com/api/v1/zones/{}" -H "Auth-Api-Token: ${HETZNER_DNS_TOKEN}"