From 86d2d09ead4685e366b7d1dcbdb6997bf9578f2d Mon Sep 17 00:00:00 2001 From: William Harrison <87287585+wdhdev@users.noreply.github.com> Date: Fri, 4 Apr 2025 14:25:35 +0800 Subject: [PATCH 01/17] feat(ci): root subdomains must have atleast one usable record --- tests/records.test.js | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/tests/records.test.js b/tests/records.test.js index 52fb1f677..47aed54d1 100644 --- a/tests/records.test.js +++ b/tests/records.test.js @@ -216,7 +216,10 @@ function validateRecordValues(t, data, file) { Number.isInteger(record.matchingType) && record.matchingType >= 0 && record.matchingType <= 255, `${file}: Invalid matchingType for ${key} at index ${idx}` ); - t.true(isValidHexadecimal(record.certificate), `${file}: Invalid certificate for ${key} at index ${idx}`); + t.true( + isValidHexadecimal(record.certificate), + `${file}: Invalid certificate for ${key} at index ${idx}` + ); } }); } @@ -310,3 +313,19 @@ t("All files should have valid record types", (t) => { t.pass(); }); + +t("Root domains should have at least one usable record", (t) => { + const usableRecordTypes = ["A", "AAAA", "CNAME", "MX", "NS", "URL"]; + + files.forEach((file) => { + if (file.replace(/\.json$/, "").includes(".")) return; + + const data = getDomainData(file); + const recordKeys = Object.keys(data.record); + + t.true( + usableRecordTypes.some((record) => recordKeys.includes(record)), + `${file}: Root subdomains must have at least one A, AAAA, CNAME, MX, NS, or URL record` + ); + }); +}); From c7077c039d0cdfa9f90c4c827986fa389b6018a8 Mon Sep 17 00:00:00 2001 From: William Harrison <87287585+wdhdev@users.noreply.github.com> Date: Fri, 4 Apr 2025 14:27:00 +0800 Subject: [PATCH 02/17] Update records.test.js --- tests/records.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/records.test.js b/tests/records.test.js index 47aed54d1..6926a88f2 100644 --- a/tests/records.test.js +++ b/tests/records.test.js @@ -314,7 +314,7 @@ t("All files should have valid record types", (t) => { t.pass(); }); -t("Root domains should have at least one usable record", (t) => { +t("Root subdomains should have at least one usable record", (t) => { const usableRecordTypes = ["A", "AAAA", "CNAME", "MX", "NS", "URL"]; files.forEach((file) => { From 1b9ea978b33ca2b50bed991d690c04f1d14f8865 Mon Sep 17 00:00:00 2001 From: William Harrison <87287585+wdhdev@users.noreply.github.com> Date: Fri, 4 Apr 2025 14:28:51 +0800 Subject: [PATCH 03/17] chore(ci): allow subdomains starting with underscores to have non-usable records --- tests/records.test.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/records.test.js b/tests/records.test.js index 6926a88f2..573e0604e 100644 --- a/tests/records.test.js +++ b/tests/records.test.js @@ -318,7 +318,8 @@ t("Root subdomains should have at least one usable record", (t) => { const usableRecordTypes = ["A", "AAAA", "CNAME", "MX", "NS", "URL"]; files.forEach((file) => { - if (file.replace(/\.json$/, "").includes(".")) return; + const subdomain = file.replace(/\.json$/, ""); + if (subdomain.includes(".") || subdomain.startsWith("_")) return; const data = getDomainData(file); const recordKeys = Object.keys(data.record); From a6f96e44c4a1b541328f88b40b7098fb7bcfb78c Mon Sep 17 00:00:00 2001 From: William Harrison <87287585+wdhdev@users.noreply.github.com> Date: Fri, 4 Apr 2025 14:30:09 +0800 Subject: [PATCH 04/17] Delete domains/angel.json --- domains/angel.json | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 domains/angel.json diff --git a/domains/angel.json b/domains/angel.json deleted file mode 100644 index 2b8a5383d..000000000 --- a/domains/angel.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "owner": { - "username": "chewieleaf", - "email": "cchirrpy@outlook.com" - }, - "record": { - "TXT": "dh=440ef941b9b55391f86cf985e87ed861fc6e9512" - } -} From ed542ea66fd7f5c15877814a0d1945ed5c9c0b7a Mon Sep 17 00:00:00 2001 From: William Harrison <87287585+wdhdev@users.noreply.github.com> Date: Fri, 4 Apr 2025 14:31:03 +0800 Subject: [PATCH 05/17] Delete domains/chewieleaf.json --- domains/chewieleaf.json | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 domains/chewieleaf.json diff --git a/domains/chewieleaf.json b/domains/chewieleaf.json deleted file mode 100644 index 699471137..000000000 --- a/domains/chewieleaf.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "owner": { - "username": "chewieleaf", - "email": "cchirrpy@outlook.com", - "discord": "898255050592366642" - }, - "record": { - "TXT": "dh=440ef941b9b55391f86cf985e87ed861fc6e9512" - } -} From 727a26e7887b904a06f819eba79f516f1c4d7811 Mon Sep 17 00:00:00 2001 From: William Harrison <87287585+wdhdev@users.noreply.github.com> Date: Fri, 4 Apr 2025 14:32:14 +0800 Subject: [PATCH 06/17] Delete domains/exx.json --- domains/exx.json | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 domains/exx.json diff --git a/domains/exx.json b/domains/exx.json deleted file mode 100644 index 977561c23..000000000 --- a/domains/exx.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "owner": { - "username": "xqxyzl", - "email": "exemailhelp+3@gmail.com" - }, - "record": { - "TXT": "_discord.exx.is-a.dev" - } -} From 272862f9fd2b863f7f7e9700c24e606cf4616007 Mon Sep 17 00:00:00 2001 From: William Harrison <87287585+wdhdev@users.noreply.github.com> Date: Fri, 4 Apr 2025 14:34:55 +0800 Subject: [PATCH 07/17] Delete domains/faultysden.json --- domains/faultysden.json | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 domains/faultysden.json diff --git a/domains/faultysden.json b/domains/faultysden.json deleted file mode 100644 index b2c3cdc94..000000000 --- a/domains/faultysden.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "owner": { - "username": "FaultyFaulty-glitch", - "email": "faultywindows+github@gmail.com", - "discord": "1041028534690386051" - }, - "record": { - "TXT": "google-site-verification=ix1jczu2q87igryc4eaexvdv1vrzjxolu14sjfpsnko" - } -} From 375eb3be5cf2048f393ca8630020f4f3cb7de77f Mon Sep 17 00:00:00 2001 From: William Harrison <87287585+wdhdev@users.noreply.github.com> Date: Fri, 4 Apr 2025 14:36:13 +0800 Subject: [PATCH 08/17] Delete domains/interstellaros.json --- domains/interstellaros.json | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 domains/interstellaros.json diff --git a/domains/interstellaros.json b/domains/interstellaros.json deleted file mode 100644 index cf559db57..000000000 --- a/domains/interstellaros.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "owner": { - "username": "jacksoncraft859", - "email": "pollardjackson@outlook.com" - }, - "record": { - "TXT": "replit-verify=ac38945f-f53b-4b1b-980d-e2a1d64175c6" - } -} From 57736f597183fe68ab86f337712d5938a1cde04c Mon Sep 17 00:00:00 2001 From: William Harrison <87287585+wdhdev@users.noreply.github.com> Date: Fri, 4 Apr 2025 14:37:27 +0800 Subject: [PATCH 09/17] Delete domains/_discord.thangle.json --- domains/_discord.thangle.json | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 domains/_discord.thangle.json diff --git a/domains/_discord.thangle.json b/domains/_discord.thangle.json deleted file mode 100644 index ed21f0026..000000000 --- a/domains/_discord.thangle.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "owner": { - "username": "ThangLe9999", - "discord": "872078632565215282", - "OWL": "eyJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwiYWxnIjoiUlNBLU9BRVAiLCJraWQiOiJaa1VsRmRqVThiUEstLXVVM2JJR09PVHFYYVFFS1ZINFVXOW53MTR6WTJnIn0.G5BtkuOaAUmFdixUP1IN4ZTmec-NZCllzsliK6q8sggJkBzasXefGfeEh6pBOiZ6ZkV2gr-GCdTN7LkP7QLPgLN6FglXac8BP1DSGDF3Lo8ULvrM-CpLUdeR0mqes6OQVvWdmPhZgVFGF3ItzDXQ7SqB6zrMbEWEwuZeg2KLHyPqvHsdrWLjzNpvVUwZRBuxicPyNTT70oMbPaOn3cvg4J_mVxNywnrIY5F34-T4tmiOEijsHmPwG2RzHsTCzC3cGYfNmokQtAsL0jhIMH4GzYdbTUsjDOrqbLdT-W2y33pQkeQuCjdf8KkeYCfacE0oWAZKFhrW2X0zJLYvGQBeuw.3qY1yT9H2x2WH2DePTziiw.PJvjWBGxfTgCKqZiHuAsRaUEdjld3XeMAw7NwX9P28VSFOS3-xsSiOvbLrCo1n1nTF-4g8EIRkkFJPn2P1T6YUDNuHVqbvnGg2wfhpfdSaM.yxghx67x9iGLMjDEKJdeAw" - }, - - "record": { - "TXT": "dh=8d98fb5fefbb1915e89d5dc43c9fdd9fa801557f" - } -} From e1d4da55a2d04ec9b4dd41d268b383db877dbac3 Mon Sep 17 00:00:00 2001 From: William Harrison <87287585+wdhdev@users.noreply.github.com> Date: Fri, 4 Apr 2025 14:37:33 +0800 Subject: [PATCH 10/17] Delete domains/thangle.json --- domains/thangle.json | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 domains/thangle.json diff --git a/domains/thangle.json b/domains/thangle.json deleted file mode 100644 index f3b5eea08..000000000 --- a/domains/thangle.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "owner": { - "username": "thangle9999", - "discord": "thangle9999" - }, - "record": { - "TXT": "vc-domain-verify=thangle.is-a.dev,bd6f80914ee2949ce900" - } -} From ed5686aa442d66b86365d41ede740ee1050cab96 Mon Sep 17 00:00:00 2001 From: William Harrison <87287585+wdhdev@users.noreply.github.com> Date: Fri, 4 Apr 2025 14:48:45 +0800 Subject: [PATCH 11/17] Create dnscontrol.yml --- .github/workflows/dnscontrol.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/dnscontrol.yml diff --git a/.github/workflows/dnscontrol.yml b/.github/workflows/dnscontrol.yml new file mode 100644 index 000000000..9656df68b --- /dev/null +++ b/.github/workflows/dnscontrol.yml @@ -0,0 +1,24 @@ +name: DNSControl + +on: + push: + branches: [main] + paths: + - "dnsconfig.js" + + workflow_dispatch: + +concurrency: + group: ${{ github.ref }}-publish + cancel-in-progress: false + +jobs: + tests: + name: Tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: is-a-dev/dnscontrol-action@main + with: + args: check From 250638528758a33bd914d1dfd808085ee0b9e835 Mon Sep 17 00:00:00 2001 From: William Harrison <87287585+wdhdev@users.noreply.github.com> Date: Fri, 4 Apr 2025 14:49:04 +0800 Subject: [PATCH 12/17] Update publish.yml --- .github/workflows/publish.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 6094cba76..157d73bfc 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -22,11 +22,6 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Run DNSControl tests - uses: is-a-dev/dnscontrol-action@main - with: - args: check - - name: Generate creds.json run: echo '{"cloudflare":{"TYPE":"CLOUDFLAREAPI","apitoken":"$CLOUDFLARE_API_TOKEN"}}' > ./creds.json From af39d20f909be00a3c3443deae470529dcd49247 Mon Sep 17 00:00:00 2001 From: William Harrison <87287585+wdhdev@users.noreply.github.com> Date: Fri, 4 Apr 2025 14:49:47 +0800 Subject: [PATCH 13/17] Update dnscontrol.yml --- .github/workflows/dnscontrol.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/dnscontrol.yml b/.github/workflows/dnscontrol.yml index 9656df68b..f1550a1ef 100644 --- a/.github/workflows/dnscontrol.yml +++ b/.github/workflows/dnscontrol.yml @@ -4,6 +4,7 @@ on: push: branches: [main] paths: + - ".github/workflows/dnscontrol.yml" - "dnsconfig.js" workflow_dispatch: From 2487d8284b6e817fcb3625f233844335b45bf256 Mon Sep 17 00:00:00 2001 From: William Harrison <87287585+wdhdev@users.noreply.github.com> Date: Fri, 4 Apr 2025 14:51:35 +0800 Subject: [PATCH 14/17] Update stale.yml --- .github/workflows/stale.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index ad78c7b61..815d5ace0 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -1,12 +1,14 @@ -name: StaleBOT +name: Stale on: - workflow_dispatch: schedule: - - cron: "30 14 * * *" + - cron: "0 12 * * *" + + workflow_dispatch: jobs: - stale: + label: + name: Label runs-on: ubuntu-latest steps: - uses: actions/stale@v3 From 05fe92c1169d8d43588e64e1ccfcbd34336ba8e7 Mon Sep 17 00:00:00 2001 From: William Harrison <87287585+wdhdev@users.noreply.github.com> Date: Fri, 4 Apr 2025 14:53:12 +0800 Subject: [PATCH 15/17] Update label.yml --- .github/workflows/label.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/label.yml b/.github/workflows/label.yml index e0891daae..415277fbe 100644 --- a/.github/workflows/label.yml +++ b/.github/workflows/label.yml @@ -1,12 +1,15 @@ -name: Pull Request Labeler +name: Label + on: schedule: - cron: "*/10 * * * *" + jobs: - labeler: + pull-requests: + name: Pull Requests runs-on: ubuntu-latest steps: - - uses: docker://docker.io/ilyam8/periodic-pr-labeler:v0.1.1 + - uses: ilyam8/periodic-pr-labeler@v0.3.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_REPOSITORY: ${{ github.repository }} From 25088a91abca0f080a5e3b78a5ff79fdad142e7e Mon Sep 17 00:00:00 2001 From: William Harrison <87287585+wdhdev@users.noreply.github.com> Date: Fri, 4 Apr 2025 14:53:57 +0800 Subject: [PATCH 16/17] Update ci.yml --- .github/workflows/ci.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1521b5990..91d81f6e7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,6 @@ on: - "tests/*" - "util/*" - ".github/workflows/ci.yml" - - "dnsconfig.js" workflow_dispatch: @@ -44,11 +43,5 @@ jobs: env: GH_TOKEN: ${{ github.token }} - - name: Run DNSControl tests - if: github.event_name == 'pull_request' && contains(fromJson(env.CHANGED_FILES), 'dnsconfig.js') - uses: is-a-dev/dnscontrol-action@main - with: - args: check - - name: Run tests run: npx ava tests/*.test.js --timeout=1m From 2e96546e58e5368f077afdb7516599168d1f1960 Mon Sep 17 00:00:00 2001 From: William Harrison <87287585+wdhdev@users.noreply.github.com> Date: Fri, 4 Apr 2025 14:54:15 +0800 Subject: [PATCH 17/17] Update dnscontrol.yml --- .github/workflows/dnscontrol.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dnscontrol.yml b/.github/workflows/dnscontrol.yml index f1550a1ef..847aae8cb 100644 --- a/.github/workflows/dnscontrol.yml +++ b/.github/workflows/dnscontrol.yml @@ -10,8 +10,8 @@ on: workflow_dispatch: concurrency: - group: ${{ github.ref }}-publish - cancel-in-progress: false + group: ${{ github.ref }}-dnscontrol + cancel-in-progress: true jobs: tests: