name: CI on: [ push, pull_request ] jobs: deploy: env: REPO: ${{ github.event.repository.name }} runs-on: ubuntu-latest permissions: pull-requests: write steps: - name: Check out repository code uses: actions/checkout@v4 with: fetch-depth: 0 - name: Setup JDK uses: actions/setup-java@v4 with: distribution: 'zulu' java-version: '21' - name: new Version if: github.ref_name == 'main' run: | ./mvnw -B --no-transfer-progress clean validate -Prelease ./mvnw -B --no-transfer-progress versions:commit -Djgitver.skip=true - name: Build Runner run: | ./mvnw -B --no-transfer-progress clean verify -Pnative -Dquarkus.native.remote-container-build=true -Djgitver.skip=true - name: Add coverage to PR id: jacoco uses: madrapps/jacoco-report@v1.7.1 with: paths: ${{ github.workspace }}/**/target/coverage/jacoco.xml token: ${{ secrets.GITHUB_TOKEN }} min-coverage-overall: 40 min-coverage-changed-files: 60 title: ${{ env.REPO }} Coverage - id: version name: Version run: echo "VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)" >> ${GITHUB_OUTPUT} - name: Build Container if: github.ref_name == 'main' run: docker build -f src/main/docker/Dockerfile.native-micro -t ${{ env.REPO }} . - name: Deploy if: github.ref_name == 'main' run: "docker compose up -d" - name: create tag if: github.ref_name == 'main' run: | git config user.email "ci@git.arindy.de" git config user.name "gitea" git add ./pom.xml git commit -m "[no ci] release ${{ steps.version.outputs.VERSION }}" git tag ${{ steps.version.outputs.VERSION }} -m "release ${{ steps.version.outputs.VERSION }}" git push origin main git push origin ${{ steps.version.outputs.VERSION }}