-
Notifications
You must be signed in to change notification settings - Fork 71
68 lines (57 loc) · 1.67 KB
/
check-pack.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# 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