This repository manages DNS configuration for srajasimman.dev
using OctoDNS, which allows for version-controlled DNS management through YAML files.
The DNS records are configured in YAML files and automatically synced to Cloudflare using GitHub Actions. This approach provides:
- Version control for all DNS changes
- Peer review through pull requests
- Automatic validation and deployment
- Centralized management for multiple domains
├── .github/workflows/ # GitHub Actions workflow definitions
├── bin/ # Helper scripts
│ ├── dry-run # Test DNS changes without applying
│ └── sync # Apply DNS changes to providers
├── config/ # OctoDNS configuration
│ └── production.yaml # Main configuration file
└── *.yaml # Domain-specific DNS records (e.g., srajasimman.dev.yaml)
- DNS records are defined in YAML files (e.g.,
srajasimman.dev.yaml
) - GitHub Actions workflow validates and applies changes:
- Pull requests: Dry run only (validation)
- Pushes to main: Apply changes to DNS providers
- Create a branch for your changes
- Edit the appropriate YAML file to add, modify, or remove DNS records
- Submit a pull request
- GitHub Actions will validate your changes
- Once approved and merged, changes will be automatically deployed
Before submitting a pull request, you can test your changes locally:
# Install dependencies
pip install -r requirements.txt
# Run a dry-run to validate changes
./bin/dry-run
# If you have proper credentials configured, you can sync changes
# (Use with caution!)
./bin/sync
The following secrets are required for deployment:
CLOUDFLARE_TOKEN
: API token for Cloudflare accessCLOUDFLARE_ACCOUNT_ID
: Cloudflare account identifier
These are configured as GitHub repository secrets for the GitHub Actions workflow.
For more details about OctoDNS configuration and usage, please refer to the OctoDNS documentation.