From 59dd2ce71bc7c4e1449c52f246abf00ab62a4820 Mon Sep 17 00:00:00 2001 From: LIBENZI Pascal Date: Thu, 2 Jan 2025 11:22:47 +0100 Subject: [PATCH] setup badges --- .github/workflows/maven-java.yml | 18 ++++++++++++++---- README.MD | 4 ++++ 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/.github/workflows/maven-java.yml b/.github/workflows/maven-java.yml index dd4f438..3473908 100644 --- a/.github/workflows/maven-java.yml +++ b/.github/workflows/maven-java.yml @@ -9,7 +9,7 @@ jobs: build: runs-on: ubuntu-latest permissions: - contents: read + contents: write packages: write steps: @@ -42,8 +42,8 @@ jobs: jacoco-csv-file: java-odoo-json-rpc-client/target/site/jacoco/jacoco.csv badges-directory: .github/badges generate-coverage-badge: true - coverage-badge-filename: rpc-client-jacoco.svg - coverage-label: rpc-core + coverage-badge-filename: json-rpc-client-jacoco.svg + coverage-label: json-rpc colors: '#4c1 #97ca00 #a4a61d #dfb317 #fe7d37 #e05d44' intervals: 100 90 80 70 60 0 @@ -55,6 +55,16 @@ jobs: badges-directory: .github/badges generate-coverage-badge: true coverage-badge-filename: xml-rpc-core-jacoco.svg - coverage-label: rpc-core + coverage-label: xml-rpc colors: '#4c1 #97ca00 #a4a61d #dfb317 #fe7d37 #e05d44' intervals: 100 90 80 70 60 0 + + - name: Commit and push the badge (if it changed) + uses: EndBug/add-and-commit@v9 + with: + default_author: github_actions + message: 'commit badges' + add: '*.svg' + author: "GitHub Actions" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/README.MD b/README.MD index 9b6e72c..fbf1925 100644 --- a/README.MD +++ b/README.MD @@ -2,6 +2,10 @@ [![Static Badge](https://img.shields.io/badge/maven%20central-0.0.4-green)](https://central.sonatype.com/artifact/ch.helvethink.odoo4java/java-odoo-rpc-parent/0.0.4) +![rpc-core-cov](.github/badges/rpc-core-jacoco.svg) +![xml-rpc-cov](.github/badges/xml-rpc-core-jacoco.svg) +![json-rpc-cov](.github/badges/json-rpc-client-jacoco.svg) + The `Java Odoo RPC` project provides tooling and abstraction for interactions with your Odoo RPC API (JSON and XML).\ First, it provides the [java-odoo-xml-rpc-core](java-odoo-xml-rpc-core/README.MD) library which provides you some tooling for the serialization of objects returned by Odoo using the XML-RPC external API.\