This commit is contained in:
Satria 2024-10-14 18:47:53 +07:00
commit aa73cbf9d1
8 changed files with 214 additions and 0 deletions

2
.github/CODEOWNERS vendored Normal file
View file

@ -0,0 +1,2 @@
* @SX-9
/domains/ @partofmyid/maintainers

14
.github/workflows/check.yml vendored Normal file
View file

@ -0,0 +1,14 @@
name: Check
on: pull_request
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: DNSControl check
uses: koenrh/dnscontrol-action@v3
with:
args: check
config_file: 'dnsconfig.js'

29
.github/workflows/deploy.yml vendored Normal file
View file

@ -0,0 +1,29 @@
name: Publish
on:
workflow_dispatch:
push:
branches: [main]
paths:
- "domains/**"
- ".github/workflows/publish.yml"
- "dnsconfig.js"
concurrency:
group: ${{ github.ref }}-publish
cancel-in-progress: false
jobs:
dns:
name: DNS
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: echo '{"cloudflare":{"TYPE":"CLOUDFLAREAPI","apitoken":"$CLOUDFLARE_API_TOKEN"}}' > ./creds.json
- name: Publish
uses: is-cool-me/dnscontrol-action@v4.11.0
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
with:
args: push
config_file: "dnsconfig.js"

38
.github/workflows/validation.yml vendored Normal file
View file

@ -0,0 +1,38 @@
name: Validation
on:
workflow_dispatch:
pull_request:
push:
branches: [main]
paths:
- "domains/**"
- ".github/workflows/validation.yml"
- "dnsconfig.js"
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: koenrh/dnscontrol-action@v3
with:
args: check
config_file: "dnsconfig.js"
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/"