Merge branch 'main' into main

This commit is contained in:
William Harrison authored and GitHub committed 2023-03-04 18:16:34 +08:00
commit f45cc278c9
25 files changed
+176 -72

No files matched your search

+9
View File
@@ -1,5 +1,14 @@
domain:
- domains/*
dns:
- "scripts/dns.js"
readme:
- "README.md"
schemas:
- schemas/**
workflows:
- .github/workflows/**
+11 -8
View File
@@ -4,7 +4,9 @@ on:
workflow_dispatch: {}
push:
branches: [main]
paths: [domains/**, .github/workflows/deploy-records.yml]
paths:
- "domains/**"
- ".github/workflows/deploy.yml"
concurrency:
group: ${{ github.ref }}-deploy
@@ -17,12 +19,13 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: gacts/install-dnscontrol@v1
- name: Create creds.json
run: echo '{"cloudflare":{"TYPE":"CLOUDFLAREAPI","apitoken":"$CLOUDFLARE_API_TOKEN"}}' > ./creds.json
- name: Create credentials file
run: echo '{"cloudflare":{"TYPE":"CLOUDFLAREAPI","accountid":"$CF_ID","apitoken":"$CF_TOKEN"}}' > ./creds.json
- run: dnscontrol push
- name: Push Data
uses: koenrh/dnscontrol-action@v3
env:
CF_ID: ${{ secrets.CF_ACCOUNT_ID }}
CF_TOKEN: ${{ secrets.CF_API_TOKEN }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
with:
args: push
config_file: "scripts/dns.js"
-25
View File
@@ -1,25 +0,0 @@
name: Issue
on:
issues:
types: [opened]
permissions:
contents: read
jobs:
comment:
name: Comment
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- uses: actions/checkout@v3
- uses: peter-evans/create-or-update-comment@v2
with:
body: "Thank you for opening an issue, we will respond as soon as possible."
issue-number: ${{ github.event.issue.number }}
token: ${{ secrets.GITHUB_TOKEN }}
+1
View File
@@ -15,6 +15,7 @@ jobs:
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
sync-labels: true
check-star:
name: Check Star
runs-on: ubuntu-latest
+12 -5
View File
@@ -4,8 +4,8 @@ on:
push:
branches: [main]
paths:
- "domains/*"
- ".github/workflows/raw-api.yml"
- "domains/*.json"
- "scripts/raw-api.js"
jobs:
@@ -22,11 +22,18 @@ jobs:
with:
node-version: 16
- name: Run Script
run: |
node scripts/raw-api.js
- run: mkdir raw-api
- name: Push Data
- name: Create CNAME
run: echo "raw.freesubdomains.org" > ./raw-api/CNAME
- name: Create index.json
run: echo "" > ./raw-api/index.json
- name: Run Script
run: node scripts/raw-api.js
- name: Push
uses: cpina/github-action-push-to-another-repository@main
with:
source-directory: "raw-api"
+22 -5
View File
@@ -5,9 +5,10 @@ on:
push:
branches: [main]
paths:
- "domains/"
- "schemas/"
- "dnsconfig.js"
- "dns/**"
- "domains/**"
- "schemas/**"
- ".github/workflows/validation.yml"
pull_request:
concurrency:
@@ -20,5 +21,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: gacts/install-dnscontrol@v1
- run: dnscontrol check
- name: Check
uses: koenrh/dnscontrol-action@v3
with:
args: check
config_file: "scripts/dns.js"
json:
name: JSON
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: JSON Syntax Check
uses: limitusus/json-syntax-check@v1
with:
pattern: "\\.json$"
env:
BASE: "domains/"
+3 -2
View File
@@ -58,7 +58,7 @@ Please select a method below to show instructions on how to register a domain.
<br>
1. **Star** and **[Fork](https://github.com/free-domains/register/fork)** this repository
2. Add a new file called `example.domain.com.json` in the `/domains` folder to register the `example` subdomain on the `domain.com`.
2. Add a new file called `example.domain.dev.json` in the `/domains` folder to register the `example` subdomain on the `domain.dev`.
- An list of available domains can be found [here](#domains).
3. Edit it to meet your needs.
- The file listed below is just an **example**, provide a **valid** JSON file with your needs.
@@ -68,7 +68,7 @@ Please select a method below to show instructions on how to register a domain.
{
"$schema": "../schemas/domain.json",
"domain": "is-a-frontend.dev",
"domain": "is-a-fullstack.dev",
"subdomain": "example",
"owner": {
@@ -107,6 +107,7 @@ Please select a method below to show instructions on how to register a domain.
|:-:|
| [`is-a-backend.dev`](https://is-a-backend.dev) |
| [`is-a-frontend.dev`](https://is-a-frontend.dev) |
| [`is-a-fullstack.dev`](https://is-a-fullstack.dev) |
### Settings
+1 -1
View File
@@ -12,5 +12,5 @@
"CNAME": "dkwygtig.github.io"
},
"proxied": true
"proxied": false
}
+16
View File
@@ -0,0 +1,16 @@
{
"$schema": "../schemas/domain.json",
"domain": "is-a-frontend.dev",
"subdomain": "kro",
"owner": {
"email": "krooking0@gmail.com"
},
"records": {
"CNAME": "cname.vercel-dns.com"
},
"proxied": false
}
+16
View File
@@ -0,0 +1,16 @@
{
"$schema": "../schemas/domain.json",
"domain": "is-a-backend.dev",
"subdomain": "mahidoodi",
"owner": {
"email": "ahmad.yk94@gmail.com"
},
"records": {
"CNAME": "crimson-lab-e0b9.powerfull.workers.dev"
},
"proxied": false
}
+1 -1
View File
@@ -9,4 +9,4 @@
},
"proxied": false
}
}
+1 -1
View File
@@ -9,4 +9,4 @@
},
"proxied": false
}
}
+46
View File
@@ -0,0 +1,46 @@
{
"$schema": "../../schemas/reserved-domain.json",
"domain": "is-a-fullstack.dev",
"subdomain": "@",
"records": {
"A": [
"185.199.108.153",
"185.199.109.153",
"185.199.110.153",
"185.199.111.153"
],
"AAAA": [
"2606:50c0:8000::153",
"2606:50c0:8001::153",
"2606:50c0:8002::153",
"2606:50c0:8003::153"
],
"TXT": [
{
"name": "*._domainkey",
"value": "v=DKIM1; p="
},
{
"name": "_dmarc",
"value": "v=DMARC1; p=reject; sp=reject; adkim=s; aspf=s;"
},
{
"name": "_github-pages-challenge-free-domains",
"value": "7c931afdc16843f326d02a669f3705"
},
{
"name": "@",
"value": "v=spf1 -all"
}
]
},
"proxied": false
}
+1 -1
View File
@@ -9,4 +9,4 @@
},
"proxied": false
}
}
+1 -1
View File
@@ -9,4 +9,4 @@
},
"proxied": false
}
}
@@ -0,0 +1,12 @@
{
"$schema": "../../schemas/reserved-domain.json",
"domain": "is-a-fullstack.dev",
"subdomain": "www",
"records": {
"CNAME": "is-a-fullstack.dev"
},
"proxied": false
}
+1 -8
View File
@@ -9,14 +9,7 @@
},
"records": {
"CNAME": "williamdavidharrison.github.io",
"TXT": [
{
"name": "_github-pages-challenge-williamdavidharrison",
"value": "48bebc4d20ca9ae5e712b5c1d0e39b"
}
]
"CNAME": "wdhdns.com"
},
"proxied": false
+1 -8
View File
@@ -9,14 +9,7 @@
},
"records": {
"CNAME": "williamdavidharrison.github.io",
"TXT": [
{
"name": "_github-pages-challenge-williamdavidharrison",
"value": "51d4a5e836ec051b1c5b3c5fb050b9"
}
]
"CNAME": "wdhdns.com"
},
"proxied": false
+16
View File
@@ -0,0 +1,16 @@
{
"$schema": "../schemas/domain.json",
"domain": "is-a-fullstack.dev",
"subdomain": "william",
"owner": {
"email": "william@freesubdomains.org"
},
"records": {
"CNAME": "wdhdns.com"
},
"proxied": false
}
-1
View File
@@ -1 +0,0 @@
raw.freesubdomains.org
View File
Whitespace-only changes.
+1 -1
View File
@@ -9,7 +9,7 @@
},
"domain": {
"type": "string",
"enum": ["is-a-backend.dev", "is-a-frontend.dev"]
"enum": ["is-a-backend.dev", "is-a-frontend.dev", "is-a-fullstack.dev"]
},
"subdomain": {
"type": "string",
+1 -1
View File
@@ -9,7 +9,7 @@
},
"domain": {
"type": "string",
"enum": ["is-a-backend.dev", "is-a-frontend.dev"]
"enum": ["is-a-backend.dev", "is-a-frontend.dev", "is-a-fullstack.dev"]
},
"subdomain": {
"type": "string",
+2 -2
View File
@@ -35,7 +35,7 @@ function getDomainsList(filesPath) {
return result;
}
var domains = getDomainsList("./domains");
var domains = getDomainsList("../domains");
/**
* @type {{}}
@@ -45,7 +45,7 @@ var commit = {};
for (var idx in domains) {
var domainData = domains[idx].data;
var proxyState = proxy.off; // Disabled by default
var proxyState = proxy.off;
if (!commit[domainData.domain]) commit[domainData.domain] = [];
if (domainData.proxied === true) proxyState = proxy.on;
+1 -1
View File
@@ -9,7 +9,7 @@ fs.readdir(directoryPath, function (err, files) {
if(err) throw err;
function removeValue(value, index, arr) {
if (value === "reserved") {
if(value === "reserved") {
arr.splice(index, 1);
return true;
}