Skip to content

Commit

Permalink
V0.3.0 - Update Readme.md, Change JDK image to temurin and improve do…
Browse files Browse the repository at this point in the history
…ckerhub description (#4)

* Use eclipse-temurin instead of openjdk as the docker image of openjdk is marked as deprecated
* Use temurin in github actions
* Push readme as dockerhub description when new images are pushed
  • Loading branch information
BolZer authored Aug 24, 2024
1 parent 6b990ff commit aabad43
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Setup JDK
uses: actions/setup-java@v3
with:
distribution: 'corretto'
distribution: 'temurin'
java-version: '21'
cache: 'gradle'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codestyle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Setup JDK
uses: actions/setup-java@v3
with:
distribution: 'corretto'
distribution: 'temurin'
java-version: '21'
cache: 'gradle'

Expand Down
15 changes: 13 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Setup JDK
uses: actions/setup-java@v3
with:
distribution: 'corretto'
distribution: 'temurin'
java-version: '21'
cache: 'gradle'

Expand All @@ -34,5 +34,16 @@ jobs:
- name: Build application
run: gradle build -Dquarkus.package.jar.type=uber-jar

- name: Build images
- name: Build images and push to dockerhub
run: docker buildx build --platform=linux/amd64 --platform=linux/arm64 -t easybill/peppol-bis-billing-validator:${{github.ref_name}} -t easybill/peppol-bis-billing-validator:latest . --push

- name: Push current readme.md as docker hub repository description
uses: christian-korneck/update-container-description-action@v1
env:
DOCKER_USER: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKER_PASS: ${{ secrets.DOCKERHUB_TOKEN }}
with:
destination_container_repo: easybill/peppol-bis-billing-validator
provider: dockerhub
short_description: 'A small docker service to provide a validation endpoint for Peppol BIS Billing 3.0 rules'
readme_file: 'README.md'
2 changes: 1 addition & 1 deletion .github/workflows/spotbugs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Setup JDK
uses: actions/setup-java@v3
with:
distribution: 'corretto'
distribution: 'temurin'
java-version: '21'
cache: 'gradle'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Setup JDK
uses: actions/setup-java@v3
with:
distribution: 'corretto'
distribution: 'temurin'
java-version: ${{ matrix.java-version }}
cache: 'gradle'

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM openjdk:21-slim
FROM eclipse-temurin:21-alpine

WORKDIR .

Expand Down
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
# peppol-bis-billing-validator
[![Generic badge](https://img.shields.io/badge/Version-0.2.0-important.svg)]()
![Docker Image Version](https://img.shields.io/docker/v/easybill/peppol-bis-billing-validator)
[![Generic badge](https://img.shields.io/badge/License-MIT-blue.svg)]()

## Introduction
`peppol-bis-billing-validator` is a small service for validating XML against the official
Peppol BIS Billing 3.0 schematron rules. It exposes a validating endpoint which takes the
Peppol BIS Billing 3.0 schematron rules. It exposes a validation endpoint which takes the
to be validated XML and returns the schematron report. The HTTP status code indicates if the
provided XML is valid (200) or has issues (400).

## Usage
This service was mainly designed with docker in mind. So general idea is to use the following
docker image and make HTTP-Requests from the main application to the service for validation the
XML.
This service was mainly designed with containerization in mind. So general idea is to use the following
docker image and make HTTP-Requests from the main application to the service for validation.

- modifying / creating docker-compose.yaml

Expand All @@ -36,7 +35,7 @@ XML.
docker compose up --detach --wait --wait-timeout 30
```

- Example of using the service (PHP)
- Example of using this service (PHP)
```PHP
<?php

Expand Down Expand Up @@ -65,7 +64,7 @@ final class PeppolValidator

- Example response in case the XML is invalid

> The `svrl:failed-assert` elements are relevant to be inspected. They contain the error message. The
> The `svrl:failed-assert` elements are relevant to be inspected. They contain the error message.
```xml
<?xml version="1.0" encoding="UTF-8"?>
<svrl:schematron-output xmlns:svrl="http://purl.oclc.org/dsdl/svrl" title="Rules for Peppol BIS 3.0 Billing" schemaVersion="iso">
Expand Down Expand Up @@ -122,4 +121,4 @@ final class PeppolValidator
```

## Issues & Contribution
Feel free to create pull-requests or an issue if you have trouble with this service or any related resource.
Feel free to create pull-requests or issues if you have trouble with this service or any related resources.

0 comments on commit aabad43

Please sign in to comment.