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