From 5abfa7ec16894386e0ac48e646af61cb1f2ef79b Mon Sep 17 00:00:00 2001 From: Simon Date: Sat, 12 Jul 2025 15:41:12 +0200 Subject: [PATCH] =?UTF-8?q?build(cicd):=20Ajoute=20un=20job=20matrix=20pou?= =?UTF-8?q?r=20g=C3=A9n=C3=A9rer=20le=20manifest=20d'un=20pack?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit supposemment capable de fonctionner en parallelle quand plusieurs packs sont modifiés --- .gitea/workflows/deliver.yml | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/deliver.yml b/.gitea/workflows/deliver.yml index e0ef5ad..89d2771 100644 --- a/.gitea/workflows/deliver.yml +++ b/.gitea/workflows/deliver.yml @@ -16,7 +16,6 @@ jobs: outputs: changed: ${{ steps.set.outputs.changed }} - steps: - uses: actions/checkout@v4 with: @@ -28,5 +27,30 @@ jobs: run: echo "$GITHUB_CONTEXT" - name: Detect changed packs + id: set run: | - git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep '^assets/' | cut -d '/' -f2 | sort -u | jq -R -s -c 'split("\n")[:-1]' + PACKS= $(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep '^assets/' | cut -d '/' -f2 | sort -u | jq -R -s -c 'split("\n")[:-1]') + echo "changed=$PACKS" >> $GITHUB_OUTPUT + + gen-manifest: + runs-on: ubuntu-latest + needs: detect-changes + strategy: + matrix: + pack: ${{ fromJson(needs.detect-changes.outputs.changed) }} + name: Generate and Check manifest of ${{ matrix.pack }} + + steps: + - uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Node.js manifest check + run: | + cd src/ + npm install + npm run start -- "assets/${{ matrix.pack }}" + cat ../${ENTRY_FOLDER}/${{ matrix.pack }}/theme.json \ No newline at end of file