From d92a17a774b35c44fb38815771b66aad01a427c8 Mon Sep 17 00:00:00 2001 From: William Harrison Date: Thu, 25 May 2023 07:48:01 +0800 Subject: [PATCH] feat: new validation workflow --- .github/workflows/validation.yml | 49 +++++++++++++++++++++----------- 1 file changed, 33 insertions(+), 16 deletions(-) diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml index 70a09daf..029f19c2 100644 --- a/.github/workflows/validation.yml +++ b/.github/workflows/validation.yml @@ -1,26 +1,43 @@ name: Validation on: - workflow_dispatch: {} - push: - branches: [main] - pull_request: + pull_request: + + push: + branches: [main] + paths: + - "domains/**" + - ".github/workflows/validation.yml" + - "dnsconfig.js" + + workflow_dispatch: concurrency: - group: ${{ github.ref }}-tests - cancel-in-progress: true + group: ${{ github.ref }}-validation + cancel-in-progress: true jobs: - check: - name: DNSControl Check - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 + dns: + name: DNS + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 - - uses: gacts/install-dnscontrol@v1 - with: - version: 3.31.4 + - 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@v3 - - - run: dnscontrol check + - name: JSON Syntax Check + uses: limitusus/json-syntax-check@v1 + with: + pattern: "\\.json$" + env: + BASE: "domains/"