343-b502699ff17141457f43e670f89969cacdf3f46f #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a basic workflow to help you get started with Actions | |
name: Check Pack | |
# Controls when the workflow will run | |
on: | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
inputs: | |
pr: | |
description: 'PR to run against' | |
required: true | |
default: '' | |
sha: | |
description: 'SHA to checkout' | |
required: true | |
default: '' | |
ref: | |
description: 'Name of pack to push' | |
required: true | |
default: '' | |
run-name: ${{ inputs.pr }}-${{ inputs.sha }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
outputs: | |
errors: ${{ steps.check-files.outputs.contents }} | |
steps: | |
- name: Checkout master | |
uses: actions/checkout@v4 | |
- name: Checkout pack | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ inputs.sha }} | |
path: pack | |
- name: Download the latest vanilla sprites | |
uses: dsaltares/fetch-gh-release-asset@1.1.0 | |
with: | |
repo: 'melkypie/sprite-exporter' | |
file: '.*-sprites\.zip' | |
regex: true | |
target: "./" | |
- name: Extract latest vanilla sprites | |
run: unzip -jq *-sprites.zip -d sprites/ | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 11 | |
distribution: temurin | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
- name: Check pack for errors | |
run: | | |
./gradlew test -DspriteFolder="sprites" -DpackFolder="pack" --tests "melky.resourcepacks.ResourcePacksPluginTest" --rerun-tasks | |
- name: Read errors | |
id: check-files | |
if: always() | |
run: | | |
./check.sh | |