From c3b681539295b23c63d0b5c056ccc9f8cb55858c Mon Sep 17 00:00:00 2001 From: Benjamin Gaussorgues Date: Thu, 16 May 2024 15:34:30 +0200 Subject: [PATCH] feat(CI): introduce check for up-to-date config.php Signed-off-by: Benjamin Gaussorgues --- .github/workflows/prerelease-dir-check.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/prerelease-dir-check.yml b/.github/workflows/prerelease-dir-check.yml index b8516c62..dcc2e2a8 100644 --- a/.github/workflows/prerelease-dir-check.yml +++ b/.github/workflows/prerelease-dir-check.yml @@ -1,4 +1,4 @@ -name: Check directory for packages +name: Check config.php is up-to-date with JSON configuration files on: pull_request @@ -6,18 +6,19 @@ permissions: contents: read concurrency: - group: prerelease-dir-check-${{ github.head_ref || github.run_id }} + group: config-up-to-date-check-${{ github.head_ref || github.run_id }} cancel-in-progress: true jobs: - prerelease-dir-check: + config-up-to-date-check: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 - - name: Make sure all releases are stable and all prereleases are unstable + - name: Make sure config.php is up-to-date with JSON files run: | - grep '/releases/' config/config.php | grep "'downloadUrl'" | grep -E '(rc|beta|alpha)' | wc -l | grep '^0$' - grep '/prereleases/' config/config.php | grep "'downloadUrl'" | grep -v -E '(rc|beta|alpha)' | wc -l | grep '^0$' + mv config/config.php config/config_pr.php + make config/config.php + diff config/config_pr.php config/config.php