From 97d5932c31037e494cb4ce799b2dba7d0ba26894 Mon Sep 17 00:00:00 2001 From: Andreas Hubel <40266+saerdnaer@users.noreply.github.com> Date: Wed, 26 Jun 2024 22:53:53 +0200 Subject: [PATCH] Update and rename mirroring.yml to validate+sync.yml --- .../{mirroring.yml => validate+sync.yml} | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) rename .github/workflows/{mirroring.yml => validate+sync.yml} (52%) diff --git a/.github/workflows/mirroring.yml b/.github/workflows/validate+sync.yml similarity index 52% rename from .github/workflows/mirroring.yml rename to .github/workflows/validate+sync.yml index 7738d384..e7ad67e0 100644 --- a/.github/workflows/mirroring.yml +++ b/.github/workflows/validate+sync.yml @@ -1,4 +1,4 @@ -name: Mirroring +name: validate & sync on: workflow_dispatch: @@ -6,7 +6,7 @@ on: branches: [ master ] jobs: - linter: + lint-and-validate: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -16,7 +16,22 @@ jobs: - name: PHP Lint uses: michaelw90/PHP-Lint@2.1.0 + - name: Check for any changed config.json files + id: check-for-changed-configs + uses: tj-actions/changed-files@v41 + with: + files: | + configs/conferences/**/config.json + + - name: Validate json files + if: steps.check-for-changed-configs.outputs.any_changed == 'true' + uses: dsanders11/json-schema-validate-action + with: + schema: docs/config-schema.json + files: configs/conferences/**/config.json + mirror: + if: secrets.SSH_PRIVATE_KEY != '' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4