From 7f31574cdf0472eb18e6ae9e4e4b083e76e06e71 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 --- .github/workflows/mirroring.yml | 32 ------------------- .github/workflows/validate+sync.yml | 49 +++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 32 deletions(-) delete mode 100644 .github/workflows/mirroring.yml create mode 100644 .github/workflows/validate+sync.yml diff --git a/.github/workflows/mirroring.yml b/.github/workflows/mirroring.yml deleted file mode 100644 index 7738d384..00000000 --- a/.github/workflows/mirroring.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: Mirroring - -on: - workflow_dispatch: - pull_request: - branches: [ master ] - -jobs: - linter: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: PHP Lint - uses: michaelw90/PHP-Lint@2.1.0 - - mirror: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Mirror to VOC gitolite - uses: pixta-dev/repository-mirroring-action@v1.1.1 - with: - target_repo_url: - git@git.c3voc.de:streaming-website.git - ssh_private_key: - ${{ secrets.SSH_PRIVATE_KEY }} diff --git a/.github/workflows/validate+sync.yml b/.github/workflows/validate+sync.yml new file mode 100644 index 00000000..ff7c47f2 --- /dev/null +++ b/.github/workflows/validate+sync.yml @@ -0,0 +1,49 @@ +name: validate & sync + +on: + workflow_dispatch: + pull_request: + branches: [ master ] + +jobs: + lint-and-validate: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - 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@v1.2.0 + with: + schema: docs/config-schema.json + files: configs/conferences/**/config.json + + mirror: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Mirror to VOC gitolite + env: + secrets_available: ${{ secrets.SSH_PRIVATE_KEY }} != '' + if: ${{ env.secrets_available }} + uses: pixta-dev/repository-mirroring-action@v1.1.1 + with: + target_repo_url: + git@git.c3voc.de:streaming-website.git + ssh_private_key: + ${{ secrets.SSH_PRIVATE_KEY }}