-
-
Notifications
You must be signed in to change notification settings - Fork 391
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #719 from is-a-good-dev/move-to-dnscontrol
feat(ci): move to dnscontrol
- Loading branch information
Showing
438 changed files
with
3,032 additions
and
3,382 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
* @Tweak4141 @clarkedev | ||
|
||
/sub-logs/* @is-a-good-dev/helpers | ||
/domains/* @is-a-good-dev/helpers | ||
/.github/* @Tweak4141 | ||
/scripts/* @Tweak4141 | ||
/utils/* @Tweak4141 | ||
/.github/workflows/* @Tweak4141 @wdhdev | ||
/dnsconfig.js @Tweak4141 @wdhdev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Publish | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
paths: | ||
- "domains/*" | ||
- ".github/workflows/publish.yml" | ||
- "dnsconfig.js" | ||
|
||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.ref }}-publish | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
dns: | ||
name: DNS | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Generate creds.json | ||
run: echo '{"cloudflare":{"TYPE":"CLOUDFLAREAPI","apitoken":"$CLOUDFLARE_API_TOKEN"}}' > ./creds.json | ||
|
||
- name: Publish | ||
uses: is-a-dev/dnscontrol-action@main | ||
env: | ||
CLOUDFLARE_API_TOKEN: ${{ secrets.API_KEY }} | ||
with: | ||
args: push |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Validation | ||
|
||
on: | ||
pull_request: | ||
|
||
push: | ||
branches: [main] | ||
paths: | ||
- "domains/*" | ||
- ".github/workflows/validation.yml" | ||
- "dnsconfig.js" | ||
|
||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.ref }}-validation | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
dns: | ||
name: DNS | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Check | ||
uses: is-a-dev/dnscontrol-action@main | ||
with: | ||
args: check | ||
|
||
json: | ||
name: JSON | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: JSON Syntax Check | ||
uses: limitusus/json-syntax-check@v2 | ||
with: | ||
pattern: "\\.json$" | ||
env: | ||
BASE: "domains/" |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
function getDomainsList(filesPath) { | ||
var result = []; | ||
var files = glob.apply(null, [filesPath, true, ".json"]); | ||
|
||
for (var i = 0; i < files.length; i++) { | ||
var name = files[i].split("/").pop().replace(/\.json$/, ""); | ||
|
||
result.push({ name: name, data: require(files[i]) }); | ||
} | ||
|
||
return result; | ||
} | ||
|
||
var domains = getDomainsList("./domains"); | ||
var commit = []; | ||
|
||
for (var subdomain in domains) { | ||
var subdomainName = domains[subdomain].name; | ||
var domainData = domains[subdomain].data; | ||
var proxyState = domainData.proxied ? { cloudflare_proxy: "on" } : { cloudflare_proxy: "off" }; | ||
|
||
// Handle A records | ||
if (domainData.target.A) { | ||
for (var a in domainData.target.A.value) { | ||
commit.push(A(domainData.target.A.name, IP(domainData.target.A.value[a]), proxyState)); | ||
} | ||
} | ||
|
||
// Handle AAAA records | ||
if (domainData.target.AAAA) { | ||
for (var aaaa in domainData.target.AAAA.value) { | ||
commit.push(AAAA(domainData.target.AAAA.name, domainData.target.AAAA.value[aaaa], proxyState)); | ||
} | ||
} | ||
|
||
// Handle CNAME records | ||
if (domainData.target.CNAME) { | ||
// Allow CNAME target on root | ||
if (subdomainName === "@") { | ||
commit.push(ALIAS(domainData.target.CNAME.name, domainData.target.CNAME.value + ".", proxyState)); | ||
} else { | ||
commit.push(CNAME(domainData.target.CNAME.name, domainData.target.CNAME.value + ".", proxyState)); | ||
} | ||
} | ||
|
||
// Handle TXT records | ||
if (domainData.target.TXT) { | ||
commit.push(TXT(domainData.target.TXT.name === "@" ? subdomainName : domainData.target.TXT.name + "." + subdomainName, domainData.target.TXT.value)); | ||
} | ||
} | ||
|
||
// Commit all DNS records | ||
D("is-a-good.dev", NewRegistrar("none"), DnsProvider(NewDnsProvider("cloudflare")), commit); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"repo": "https://github.com/is-a-good-dev/register", | ||
|
||
"owner": { | ||
"username": "is-a-good-dev", | ||
"email": "will@is-a-good.dev" | ||
}, | ||
|
||
"target": { | ||
"CNAME": { | ||
"name": "@", | ||
"value": "is-a-good-dev.github.io" | ||
} | ||
}, | ||
|
||
"proxied": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"repo": "https://github.com/Adriichu/is-a-good-dev", | ||
|
||
"owner": { | ||
"username": "Adriichuuu", | ||
"email": "aaron@proton.me" | ||
}, | ||
|
||
"target": { | ||
"CNAME": { | ||
"name": "aaron", | ||
"value": "aaron-web.pages.dev" | ||
} | ||
}, | ||
|
||
"proxied": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"website": "https://opaayush.pages.dev", | ||
|
||
"owner": { | ||
"username": "OpAayush", | ||
"email": "aayushmagrawal@gmail.com" | ||
}, | ||
|
||
"target": { | ||
"CNAME": { | ||
"name": "aayush", | ||
"value": "opaayush.pages.dev" | ||
}, | ||
"TXT": { | ||
"name": "_github-pages-challenge-OpAayush", | ||
"value": "d9cdcc62ad8d21a614cf615bc2535b" | ||
} | ||
}, | ||
|
||
"proxied": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"repo": "https://github.com/abardia/abardia.github.io", | ||
|
||
"owner": { | ||
"username": "abardia", | ||
"email": "a.bardia@yahoo.de" | ||
}, | ||
|
||
"target": { | ||
"CNAME": { | ||
"name": "abardia", | ||
"value": "abardia.github.io" | ||
} | ||
}, | ||
|
||
"proxied": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"owner": { | ||
"username": "abderrazak", | ||
"email": "bahajabde0@gmail.com" | ||
}, | ||
|
||
"target": { | ||
"CNAME": { | ||
"name": "abderrazak-bahaj", | ||
"value": "abderrazak-Baha.github.io" | ||
} | ||
}, | ||
|
||
"proxied": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"repo": "https://github.com/abdullahnasir4/register", | ||
|
||
"owner": { | ||
"username": "AbdullahNasir", | ||
"email": "abdullahnasir751@gmail.com" | ||
}, | ||
|
||
"target": { | ||
"CNAME": { | ||
"name": "Abdullah", | ||
"value": "abdullah.github.io" | ||
} | ||
}, | ||
|
||
"proxied": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"owner": { | ||
"username": "AceyDoCodes", | ||
"email": "aceygoesboom@gmail.com" | ||
}, | ||
|
||
"target": { | ||
"CNAME": { | ||
"name": "acey", | ||
"value": "cname.vercel-dns.com" | ||
} | ||
}, | ||
|
||
"proxied": false | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"owner": { | ||
"username": "adnansid99", | ||
"email": "asr3012003@gmail.com" | ||
}, | ||
|
||
"target": { | ||
"CNAME": { | ||
"name": "adnan", | ||
"value": "adnan.pages.dev" | ||
} | ||
}, | ||
|
||
"proxied": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"owner": { | ||
"username": "alijafari-gd", | ||
"email": "ali.jafari.sn@gmail.com" | ||
}, | ||
|
||
"target": { | ||
"CNAME": { | ||
"name": "aj", | ||
"value": "alijafari.is-a.dev" | ||
} | ||
}, | ||
|
||
"proxied": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"owner": { | ||
"username": "ajay-charotariya", | ||
"email": "ajay-charotariya@acquaintsofttech.com" | ||
}, | ||
"target": { | ||
"CNAME": { | ||
"name": "ajay-charotariya", | ||
"value": "ajay-charotariya.github.io" | ||
} | ||
}, | ||
"proxied": false | ||
} |
Oops, something went wrong.