name: "Validate Resource Packs" on: push: branches: [ "main" ] paths: - 'resourcepacks/**' - '.actions/resources/**' workflow_dispatch: jobs: validate: runs-on: technocality steps: - name: Checkout uses: actions/checkout@v5 with: sparse-checkout: | resourcepacks .actions - name: Setup Java uses: actions/setup-java@v4 with: distribution: 'temurin' java-version: '25' - name: Cache RPV Jar id: cache-rpv uses: actions/cache@v4 with: path: ~/rpv.jar key: rpv-jar-v1 - name: Build RPV if: steps.cache-rpv.outputs.cache-hit != 'true' run: | git clone --depth 1 https://github.com/MrKinau/ResourcePackValidator.git /tmp/rpv-src cd /tmp/rpv-src && mvn package -q -DskipTests cp target/ResourcePackValidator*.jar ~/rpv.jar - name: Install Rust run: | if ! command -v cargo &> /dev/null; then curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y echo "$HOME/.cargo/bin" >> $GITHUB_PATH fi - name: Run Validator run: | [ -f "$HOME/.cargo/env" ] && source "$HOME/.cargo/env" cargo run --release --manifest-path .actions/resources/Cargo.toml