My GitHub workflow always fails at building a Java project using gradle and it gives me the following error:

```Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain
Caused by: java.lang.ClassNotFoundException: org.gradle.wrapper.GradleWrapperMain
Error: Process completed with exit code 1.```

Can you tell my why it occurs?
The error message suggests that the Java runtime environment is unable to find the Gradle wrapper main class during the build process.

Here are a few potential reasons why this error could occur:

1. Gradle wrapper not installed: The Gradle wrapper is a lightweight version of Gradle that can be used to build projects without requiring a separate Gradle installation. It's possible that the wrapper is not installed in the project directory, causing the build process to fail. To fix this, you can run the gradle wrapper command in the project directory to generate the wrapper files.

2. Corrupted Gradle wrapper files: It's possible that the Gradle wrapper files have become corrupted, causing the build process to fail. In this case, you can try deleting the .gradle directory in the project directory and re-generating the wrapper files using the gradle wrapper command.

3. Incorrect version of Gradle: If the Gradle wrapper files are present but the error still occurs, it's possible that the project is using an incompatible version of Gradle. You can try updating the Gradle version in the gradle-wrapper.properties file to match the version of Gradle installed on your system.

I hope this helps! Let me know if you have any further questions or need more assistance.