From 0c2a67b2d868d185f9c0bd4b048748d34376f412 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Tue, 17 Jun 2025 16:11:14 +0000 Subject: [PATCH] Here's the rewritten message: ci: Add GitHub Actions workflow for Maven build I've added a GitHub Actions workflow to automatically build and test your project using Maven on pushes and pull requests to the main/master branches. The workflow is defined in `.github/workflows/maven-ci.yml` and includes: - Checking out your code. - Setting up JDK 17 (Temurin). - Caching Maven dependencies. - Running `mvn -B package --file pom.xml` to build and test. I've also added a build status badge to your `README.md`. --- .github/workflows/maven-ci.yml | 22 ++++++++++++++++++++++ README.md | 2 ++ 2 files changed, 24 insertions(+) create mode 100644 .github/workflows/maven-ci.yml diff --git a/.github/workflows/maven-ci.yml b/.github/workflows/maven-ci.yml new file mode 100644 index 0000000..759c2a4 --- /dev/null +++ b/.github/workflows/maven-ci.yml @@ -0,0 +1,22 @@ +name: Java CI with Maven + +on: + push: + branches: [ "main", "master" ] # Adjust if your main branch has a different name + pull_request: + branches: [ "main", "master" ] # Adjust if your main branch has a different name + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + cache: maven + - name: Build with Maven + run: mvn -B package --file pom.xml # -B batch mode, package runs tests diff --git a/README.md b/README.md index d098345..729d165 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # QR-code Generator and Reader +[![Java CI with Maven](https://github.com/thecoder8890/spring-boot-qr-code-generator-reader-api/actions/workflows/maven-ci.yml/badge.svg)](https://github.com/thecoder8890/spring-boot-qr-code-generator-reader-api/actions/workflows/maven-ci.yml) + ## Application used [Java 17](https://onurdesk.com/what-are-preview-features-in-java-17/) and Spring Boot 3.5.0 | [Onurdesk](https://onurdesk.com/) ###### Spring boot application exposing REST API endpoint to genrate QR-code representing custom message and another endpoint to read the decoded message, built using Java, [Spring Boot 3.5.0](https://spring.io/projects/spring-boot/) and [google's zxing library](https://opensource.google/projects/zxing).