From 5e3b42314de44e960e9143834de9fc9489718cec Mon Sep 17 00:00:00 2001 From: Jasper Mayone Date: Thu, 2 May 2024 10:08:09 -0400 Subject: [PATCH 1/3] establish naming consistancy --- .github/workflows/{test.yml => dry-run.yml} | 7 ++++--- .github/workflows/{deploy.yml => sync.yml} | 5 +++-- .github/workflows/validate.yml | 5 ++--- 3 files changed, 9 insertions(+), 8 deletions(-) rename .github/workflows/{test.yml => dry-run.yml} (76%) rename .github/workflows/{deploy.yml => sync.yml} (84%) diff --git a/.github/workflows/test.yml b/.github/workflows/dry-run.yml similarity index 76% rename from .github/workflows/test.yml rename to .github/workflows/dry-run.yml index ed167f00..626c2841 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/dry-run.yml @@ -1,6 +1,6 @@ -name: test +name: Dry Run DNS -on: ['push', 'pull_request'] +on: ["push", "pull_request"] jobs: octodns: @@ -9,7 +9,8 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: '3' + python-version: "3" + cache: "pip" # caches pip dependencies - name: Install OctoDNS run: pip install 'octodns==0.9.10' - name: Do a dry run diff --git a/.github/workflows/deploy.yml b/.github/workflows/sync.yml similarity index 84% rename from .github/workflows/deploy.yml rename to .github/workflows/sync.yml index 16d958cb..67d072bc 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/sync.yml @@ -1,4 +1,4 @@ -name: deploy +name: Sync DNS on: workflow_dispatch: @@ -13,7 +13,8 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: '3' + python-version: "3" + cache: "pip" # caches pip dependencies - name: Install OctoDNS run: pip install 'octodns==0.9.10' - name: Sync w/ production DNS providers diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index d3244649..a8dd94e8 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -1,4 +1,4 @@ -name: json-yaml-validate +name: Validate DNS Configs on: push: branches: @@ -15,8 +15,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - - name: json-yaml-validate + - name: Validdate JSON & YAML id: json-yaml-validate uses: GrantBirki/json-yaml-validate@v2.7.1 with: From e7fc36b0c67449049dfbb7909bf774c15cd255b7 Mon Sep 17 00:00:00 2001 From: Jasper Mayone Date: Thu, 2 May 2024 10:08:28 -0400 Subject: [PATCH 2/3] create sync-force --- .github/workflows/sync-force.yml | 22 ++++++++++++++++++++++ bin/sync-force | 3 +++ 2 files changed, 25 insertions(+) create mode 100644 .github/workflows/sync-force.yml create mode 100644 bin/sync-force diff --git a/.github/workflows/sync-force.yml b/.github/workflows/sync-force.yml new file mode 100644 index 00000000..9da94dd0 --- /dev/null +++ b/.github/workflows/sync-force.yml @@ -0,0 +1,22 @@ +# workflow_dispatch +name: Sync DNS (Forcefull) + +on: + workflow_dispatch: + +jobs: + octodns: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3" + cache: "pip" # caches pip dependencies + - name: Install OctoDNS + run: pip install 'octodns==0.9.10' + - name: Sync w/ production DNS providers (forcefully) + run: ./bin/sync-force + env: + DNSIMPLE_ACCOUNT_NUMBER: ${{ secrets.DNSIMPLE_ACCOUNT_NUMBER }} + DNSIMPLE_API_KEY: ${{ secrets.DNSIMPLE_API_KEY }} diff --git a/bin/sync-force b/bin/sync-force new file mode 100644 index 00000000..8a9fc5fc --- /dev/null +++ b/bin/sync-force @@ -0,0 +1,3 @@ +#!/bin/sh + +octodns-sync --config-file=./config/production.yaml --doit --force From f23eb7a24a662d41996f51400931965da4d80e35 Mon Sep 17 00:00:00 2001 From: Jasper Mayone Date: Sat, 4 May 2024 20:09:26 -0400 Subject: [PATCH 3/3] start documenting validations --- .github/workflows/validate.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index a8dd94e8..f62a9b3f 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -20,3 +20,7 @@ jobs: uses: GrantBirki/json-yaml-validate@v2.7.1 with: comment: "true" +# octodns --force testing +# things that cause octodns to need --force +# - ns record changes +# - undetermined percentage of dns changes