From 585dd26a7be3fa5c5b7378a0ca583bfe47727b9d Mon Sep 17 00:00:00 2001 From: hitanshu310 Date: Wed, 28 May 2025 18:55:38 +0530 Subject: [PATCH 1/2] Workflow to only build on PR and building an image only on push to test --- .gitea/workflows/test_build.yml | 20 ++++++++++++++++++++ .gitea/workflows/test_image_build_push.yml | 3 --- 2 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 .gitea/workflows/test_build.yml diff --git a/.gitea/workflows/test_build.yml b/.gitea/workflows/test_build.yml new file mode 100644 index 0000000..0a4e7d0 --- /dev/null +++ b/.gitea/workflows/test_build.yml @@ -0,0 +1,20 @@ +name: sample gradle build and test +run-name: Build started by $ {{gitea.actor}} +on: + pull_request: + branches: [test] +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Check out repository code + uses: actions/checkout@v4 + - name: JDK setup + uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: '17' + - name: Validate Gradle Wrapper + uses: gradle/actions/wrapper-validation@v3 + - name: Gradle build + run: /gradlew build --debug \ No newline at end of file diff --git a/.gitea/workflows/test_image_build_push.yml b/.gitea/workflows/test_image_build_push.yml index fac82f9..f45a5a8 100644 --- a/.gitea/workflows/test_image_build_push.yml +++ b/.gitea/workflows/test_image_build_push.yml @@ -3,9 +3,6 @@ run-name: Build started by $ {{gitea.actor}} on: push: branches: [test] - pull_request: - branches: [test] -jobs: build: runs-on: ubuntu-latest container: From 882b12781832c50ea57d0fbcb582f689606949d5 Mon Sep 17 00:00:00 2001 From: hitanshu310 Date: Wed, 28 May 2025 19:01:11 +0530 Subject: [PATCH 2/2] Fixing issue related to not beaing able to execute gradlew --- .gitea/workflows/test_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/test_build.yml b/.gitea/workflows/test_build.yml index 0a4e7d0..05e8adb 100644 --- a/.gitea/workflows/test_build.yml +++ b/.gitea/workflows/test_build.yml @@ -17,4 +17,4 @@ jobs: - name: Validate Gradle Wrapper uses: gradle/actions/wrapper-validation@v3 - name: Gradle build - run: /gradlew build --debug \ No newline at end of file + run: ./gradlew build --debug \ No newline at end of file