Skip to content

Commit

Permalink
feat(CI): introduce check for up-to-date config.php
Browse files Browse the repository at this point in the history
Signed-off-by: Benjamin Gaussorgues <[email protected]>
  • Loading branch information
Altahrim committed May 27, 2024
1 parent d02387b commit 7d8f66f
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/prerelease-dir-check.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
name: Check directory for packages
name: Check config.php is up-to-date with JSON configuration files

on: pull_request

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

0 comments on commit 7d8f66f

Please sign in to comment.