diff --git a/.forgejo/workflows/wf-validate-datapacks.yml b/.forgejo/workflows/wf-validate-datapacks.yml new file mode 100644 index 000000000..21565d4d5 --- /dev/null +++ b/.forgejo/workflows/wf-validate-datapacks.yml @@ -0,0 +1,32 @@ +name: Validate Datapacks +on: + push: + branches: [ "main" ] + paths: + - 'datapacks/**' + schedule: + - cron: "0 */4 * * *" + workflow_dispatch: + +jobs: + validate: + runs-on: technocality + steps: + - uses: actions/checkout@v5 + with: + fetch-depth: 0 + + - name: legacy-nether + uses: https://github.com/ChenCMD/datapack-linter@v2 + with: + lintDirectory: datapacks/external/legacy-nether + + - name: legacy-nether-extended + uses: https://github.com/ChenCMD/datapack-linter@v2 + with: + lintDirectory: datapacks/external/legacy-nether-extended + + - name: legacy-mechanics + uses: https://github.com/ChenCMD/datapack-linter@v2 + with: + lintDirectory: datapacks/external/legacy-mechanics \ No newline at end of file diff --git a/.forgejo/workflows/wf-validate-resource-packs.yml b/.forgejo/workflows/wf-validate-resource-packs.yml new file mode 100644 index 000000000..80ab892f1 --- /dev/null +++ b/.forgejo/workflows/wf-validate-resource-packs.yml @@ -0,0 +1,32 @@ +name: Validate Resource Packs +on: + push: + branches: [ "main" ] + paths: + - 'resourcepacks/**' + schedule: + - cron: "0 */4 * * *" + workflow_dispatch: +jobs: + validate: + runs-on: technocality + container: + image: ghcr.io/mrkinau/resourcepackvalidator:master + steps: + - uses: actions/checkout@v5 + with: + fetch-depth: 1 + - name: Validate all + run: | + failed=0 + for dir in ./resourcepacks/external/*/; do + pack=$(basename "$dir") + echo "Validating $pack" + resourcepackvalidator -rp "$dir" -report "./report-$pack.xml" || failed=1 + done + for dir in ./resourcepacks/internal/*/; do + pack=$(basename "$dir") + echo "Validating $pack" + resourcepackvalidator -rp "$dir" -report "./report-$pack.xml" || failed=1 + done + exit $failed \ No newline at end of file