Skip to content

Commit 4172c7b

Browse files
committed
init
0 parents  commit 4172c7b

11 files changed

Lines changed: 122 additions & 0 deletions

File tree

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.yaml linguist-detectable
2+
*.yml linguist-detectable

.github/CODEOWNERS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
* @jaspermayone
2+
3+
.github/** @jaspermayone

.github/workflows/deploy.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: deploy
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
octodns:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-python@v5
15+
with:
16+
python-version: '3'
17+
- name: Install OctoDNS
18+
run: pip install 'octodns>=1.5.0' octodns-dnsimple octodns-cloudflare
19+
- name: Sync w/ production DNS providers
20+
run: ./bin/sync
21+
env:
22+
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }}

.github/workflows/test.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: test
2+
3+
on: ['push', 'pull_request_target']
4+
5+
jobs:
6+
octodns:
7+
runs-on: ubuntu-latest
8+
steps:
9+
# For forked PRs: checkout the PR head (fork + SHA)
10+
- name: Checkout PR head
11+
if: github.event_name == 'pull_request_target'
12+
uses: actions/checkout@v4
13+
with:
14+
repository: ${{ github.event.pull_request.head.repo.full_name }}
15+
ref: ${{ github.event.pull_request.head.sha }}
16+
17+
# For normal pushes: default checkout
18+
- name: Checkout (push)
19+
if: github.event_name != 'pull_request_target'
20+
uses: actions/checkout@v4
21+
22+
- uses: actions/setup-python@v5
23+
with:
24+
python-version: '3'
25+
26+
- name: Install OctoDNS
27+
run: pip install 'octodns>=1.5.0' octodns-cloudflare octodns-dnsimple
28+
29+
- name: Do a dry run
30+
run: ./bin/dry-run
31+
env:
32+
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN_READ_ONLY }}

.github/workflows/validate.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: json-yaml-validate
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pull-requests: write
12+
13+
jobs:
14+
json-yaml-validate:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: json-yaml-validate
20+
id: json-yaml-validate
21+
uses: GrantBirki/json-yaml-validate@v2.7.1
22+
with:
23+
comment: "true"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.env

bin/dry-run

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
3+
octodns-sync --config-file=./config/config.yaml

bin/sync

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
3+
octodns-sync --config-file=./config/config.yaml --doit

config/config.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
providers:
3+
config:
4+
class: octodns.provider.yaml.YamlProvider
5+
directory: ./
6+
enforce_order: False
7+
cloudflare:
8+
class: octodns_cloudflare.CloudflareProvider
9+
token: env/CLOUDFLARE_TOKEN
10+
# Production best practices
11+
plan_type: free # Cloudflare plan type
12+
min_ttl: 120 # Cloudflare minimum
13+
# Enhanced reliability settings
14+
retry_count: 5 # More retries for production
15+
retry_period: 600 # 10 minute wait on rate limits
16+
zones_per_page: 50 # API pagination
17+
records_per_page: 100 # API pagination
18+
19+
zones:
20+
witcc.dev.:
21+
sources:
22+
- config
23+
targets:
24+
- cloudflare
25+
hackwit.org.:
26+
sources:
27+
- config
28+
targets:
29+
- cloudflare

hackwit.org.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# ---
2+
# "":

0 commit comments

Comments
 (0)