mirror of
https://github.com/Nostalgica-Reverie/Content-Monorepo.git
synced 2026-05-09 00:24:15 +00:00
33 lines
1.1 KiB
YAML
33 lines
1.1 KiB
YAML
name: Validate Resource Packs
|
|
on:
|
|
push:
|
|
branches: [ "main" ]
|
|
paths:
|
|
- 'resourcepacks/external*'
|
|
schedule:
|
|
- cron: "0 */4 * * *"
|
|
workflow_dispatch:
|
|
jobs:
|
|
validate:
|
|
runs-on: technocality
|
|
container:
|
|
image: maven:3.9-eclipse-temurin-17
|
|
steps:
|
|
- name: Checkout
|
|
run: |
|
|
server=$(echo "${{ github.server_url }}" | sed 's|https://||')
|
|
git clone --depth 1 https://oauth2:${{ secrets.FORGEJO_TOKEN }}@${server}/${{ github.repository }} /tmp/workspace
|
|
cd /tmp/workspace && git checkout ${{ github.sha }}
|
|
|
|
- name: Build ResourcePackValidator
|
|
run: git clone https://github.com/MrKinau/ResourcePackValidator.git /tmp/rpv-src && cd /tmp/rpv-src && mvn package -q -DskipTests && cp target/ResourcePackValidator*.jar /tmp/rpv.jar
|
|
|
|
- name: Validate all
|
|
run: |
|
|
failed=0
|
|
for dir in /tmp/workspace/resourcepacks/external/*/; do
|
|
[ -d "$dir" ] || continue
|
|
echo "Validating $(basename $dir)"
|
|
java -jar /tmp/rpv.jar -rp "$dir" -config /tmp/workspace/rpv-config.json || failed=1
|
|
done
|
|
exit $failed |