From 6752791afec7423ada31a0e9f1748cf949aec37b Mon Sep 17 00:00:00 2001
From: modmuss50 <modmuss50@gmail.com>
Date: Mon, 13 Feb 2023 09:30:39 +0000
Subject: [PATCH] Add github action to check that all resources are generated.
 (#2877)

* Add github action to check that all resources are generated.

* Test

* Revert "Test"

This reverts commit 8e187bc7815ee44d3b32fa6454973f4b30a05f10.

(cherry picked from commit 40dc7a94f63da8186472c4ec175b74531276ea93)
---
 .github/workflows/build.yml | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 32c58a56d..8923d4b18 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -65,3 +65,16 @@ jobs:
           java-version: '17'
       - run: mkdir run && echo "eula=true" >> run/eula.txt
       - run: ./gradlew runProductionAutoTestServer --stacktrace --warning-mode=fail
+
+  check_resources:
+    runs-on: ubuntu-22.04
+    steps:
+      - uses: actions/checkout@v3
+        with:
+          fetch-depth: 0
+      - uses: actions/setup-java@v3
+        with:
+          distribution: 'microsoft'
+          java-version: '17'
+      - run: ./gradlew generateResources --stacktrace --warning-mode=fail
+      - run: if [ -n "$(git status --porcelain)" ]; then exit 1; fi