Skip to content

add README.md

add README.md #441

Workflow file for this run

name: Test and Compile
on:
workflow_dispatch:
inputs:
dockerTag:
description: If set, docker img is built and tagged accordingly
required: false
push:
jobs:
Compile-and-Test:
name: Compile and Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- name: Compile and test project
run: ./mvnw -B -U
--no-transfer-progress
compile test
- name: Show 3rd-Party Licenses
run: |
cat ./target/generated-sources/license/THIRD-PARTY.txt
- name: Upload Test Results
if: always()
uses: actions/upload-artifact@v4
with:
name: Test Results
path: "**/TEST-*.xml"
- name: Upload Licenses List
if: always()
uses: actions/upload-artifact@v4
with:
name: Licenses List
path: "./target/generated-sources/license/THIRD-PARTY.txt"
Build-and-Deploy:
name: "Build and Push Docker Image"
runs-on: ubuntu-latest
if: contains(fromJSON('["main", "develop", "redlink", "staging"]'), github.ref_name) || github.event.inputs.dockerTag != ''
needs:
- Compile-and-Test
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- name: Generate additional Docker-Tags
run: |
TAGS=${BRANCH}
if [ "$BRANCH" == "$MAIN_BRANCH" ]; then
TAGS="latest,$TAGS"
fi
if [ -n "$EVENT_PARAM" ]; then
TAGS="$EVENT_PARAM"
fi
echo "Generated Docker-Tags: $TAGS"
echo "TAGS=$TAGS" >> "$GITHUB_ENV"
env:
BRANCH: ${{ github.ref_name }}
MAIN_BRANCH: ${{ github.event.repository.default_branch }}
EVENT_PARAM: ${{ github.event.inputs.dockerTag }}
- name: Build JIB container and publish to GitHub Packages
run:
./mvnw -B -U
--no-transfer-progress
clean verify jib:build
-Drevision=${{github.run_number}}
-Dchangelist=
-Dsha1=.${GITHUB_SHA:0:7}
-Dquick
-Ddocker.namespace=${DOCKER_NAMESPACE,,}
-Djib.to.tags=${TAGS}
-Djib.to.auth.username=${{ github.actor }}
-Djib.to.auth.password=${{ secrets.GITHUB_TOKEN }}
env:
DOCKER_NAMESPACE: ghcr.io/${{ github.repository_owner }}
event_file:
name: "Event File"
runs-on: ubuntu-latest
steps:
- name: Upload
uses: actions/upload-artifact@v4
with:
name: Event File
path: ${{ github.event_path }}