55 lines
1.3 KiB
YAML
55 lines
1.3 KiB
YAML
name: Wallset Pipeline
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- 'assets/**'
|
|
|
|
env:
|
|
ENTRY_FOLDER: assets
|
|
PACKAGE_NAME: "" # Not used while matrixing
|
|
RELEASE_VERSION: v${{ github.run_number }}
|
|
|
|
jobs:
|
|
detect-changes:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
changed: ${{ steps.set.outputs.changed }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Dump GitHub context
|
|
env:
|
|
GITHUB_CONTEXT: ${{ toJson(github) }}
|
|
run: echo "$GITHUB_CONTEXT"
|
|
|
|
- name: Detect changed packs
|
|
id: set
|
|
run: |
|
|
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) }}
|
|
|
|
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 -- ${ENTRY_FOLDER} ${{ matrix.pack }}
|
|
cat ../${ENTRY_FOLDER}/${{ matrix.pack }}/theme.json |