From f7268aa41c974cd18287c5b1e53433f497135c8a Mon Sep 17 00:00:00 2001 From: hitanshu310 Date: Sat, 24 May 2025 23:03:14 +0000 Subject: [PATCH] workflows (#2) Reviewed-on: https://gitea.hithomelabs.com/Hithomelabs/CFTunnels/pulls/2 Co-authored-by: hitanshu310 Co-committed-by: hitanshu310 --- .gitea/workflows/test_image_build_push.yml | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .gitea/workflows/test_image_build_push.yml diff --git a/.gitea/workflows/test_image_build_push.yml b/.gitea/workflows/test_image_build_push.yml new file mode 100644 index 0000000..f5805cb --- /dev/null +++ b/.gitea/workflows/test_image_build_push.yml @@ -0,0 +1,34 @@ +name: sample gradle build and test +run-name: Build started by $ {{gitea.actor}} +on: + push: + branches: [test] + pull_request: + branches: [test] +jobs: + build: + runs-on: ubuntu-latest + container: + image: catthehacker/ubuntu:act-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: Check secrets + run: echo "my secret is ${{ secrets.TOKEN }}" + - name: Log in to Gitea Docker Registry + uses: docker/login-action@v3 + with: + registry: 'http://192.168.0.100:8928' + username: hitanshu + password: ${{ secrets.TOKEN }} + - name: Gradle build + run: ./gradlew bootBuildImage --imageName=192.168.0.100:8928/hithomelabs/cftunnels:latest + - name: Push to Gitea Registry + run: docker push 192.168.0.100:8928/hithomelabs/cftunnels:latest