17 Commits

Author SHA1 Message Date
gitea 1dc4940d8c [no ci] prepare new Version 2025-02-11 23:06:46 +00:00
gitea 1cefb117fe [no ci] release 1.0.2 2025-02-11 23:06:40 +00:00
arindy ba48da80ed Merge pull request 'upload-to-packages' (#24) from upload-to-packages into main
CI / deploy (push) Successful in 4m55s
Reviewed-on: #24
2025-02-12 00:01:51 +01:00
arindy 4fd83f48cd adds Version to index
CI / deploy (push) Successful in 4m22s
CI / deploy (pull_request) Successful in 4m27s
2025-02-11 23:52:08 +01:00
arindy 24acc0b942 push to packages
CI / deploy (push) Successful in 4m25s
CI / deploy (pull_request) Successful in 4m26s
2025-02-11 23:34:46 +01:00
arindy cab7ec34d2 push to packages
CI / deploy (push) Failing after 6s
2025-02-11 23:01:24 +01:00
gitea c8cd05f035 [no ci] prepare new Version 2025-02-11 21:56:44 +00:00
gitea 3e35dfb9ba [no ci] release 1.0.1 2025-02-11 21:56:38 +00:00
arindy f465e1c101 fix SNAPSHOTS
CI / deploy (push) Successful in 5m5s
2025-02-11 22:51:33 +01:00
gitea 2f4cc2de8b [no ci] release 1.0.1 2025-02-11 21:40:20 +00:00
arindy b977996689 uses mvn:versions instead of jgitver
CI / deploy (push) Successful in 4m46s
2025-02-11 22:35:30 +01:00
arindy 1544776ecc fix tag
CI / deploy (push) Failing after 4m59s
2025-02-11 22:00:44 +01:00
arindy 468d9660c4 Merge pull request 'jgitver' (#23) from jgitver into main
CI / deploy (push) Failing after 4m48s
Reviewed-on: #23
2025-02-11 21:42:15 +01:00
arindy a43f5b30f7 remove SNAPSHOT
CI / deploy (push) Successful in 4m53s
CI / deploy (pull_request) Successful in 4m50s
2025-02-11 21:31:28 +01:00
arindy 4ebd9a7262 fetch tags
CI / deploy (push) Successful in 6m58s
2025-02-11 20:42:22 +01:00
arindy ad4179a517 Merge pull request 'adds jgitver' (#22) from jgitver into main
CI / deploy (push) Successful in 4m35s
Reviewed-on: #22
2025-02-11 20:36:32 +01:00
Arindy f7705e15e5 adds jgitver
CI / deploy (push) Successful in 4m30s
CI / deploy (pull_request) Successful in 4m27s
2025-02-11 20:24:09 +01:00
7 changed files with 140 additions and 7 deletions
+32 -2
View File
@@ -11,6 +11,8 @@ jobs:
steps:
- name: Check out repository code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup JDK
uses: actions/setup-java@v4
@@ -18,8 +20,14 @@ jobs:
distribution: 'zulu'
java-version: '21'
- name: new Version
if: github.ref_name == 'main'
run: |
./mvnw -B --no-transfer-progress versions:set -DremoveSnapshot
- name: Build Runner
run: ./mvnw --no-transfer-progress clean verify -Pnative -Dquarkus.native.remote-container-build=true
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
@@ -31,10 +39,32 @@ jobs:
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 }} .
run: |
echo ${{secrets.PACKAGES_TOKEN}} | docker login --username ${{ secrets.PACKAGES_USER }} --password-stdin git.arindy.de
docker build -f src/main/docker/Dockerfile.native-micro -t git.arindy.de/arindy/dice-tower:latest -t git.arindy.de/arindy/dice-tower:${{ steps.version.outputs.VERSION }} .
docker push git.arindy.de/arindy/dice-tower:${{ steps.version.outputs.VERSION }}
docker push git.arindy.de/arindy/dice-tower:latest
- 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 }}"
./mvnw -B --no-transfer-progress clean validate -Pnew-snapshot
git add ./pom.xml
git commit -m "[no ci] prepare new Version"
git tag ${{ steps.version.outputs.VERSION }} -m "release ${{ steps.version.outputs.VERSION }}"
git push origin main
git push origin ${{ steps.version.outputs.VERSION }}
+23 -2
View File
@@ -6,7 +6,8 @@
<p align="center">
<a href="#key-features">Key Features</a> •
<a href="#how-to-build">How To Build</a> •
<a href="#start-container">Start Container</a> •
<a href="#how-to-build-from-scratch">How To Build from scratch</a> •
<a href="#credits">Credits</a> •
<a href="#license">License</a>
</p>
@@ -24,8 +25,28 @@
* Watch roll results (also available as Browser Source in OBS)
---
## Start Container
## How To Build
You can start dice-tower with docker compose
Create a `compose.yml`-File with following content:
```yaml
services:
api:
container_name: dice-tower
image: git.arindy.de/arindy/dice-tower:latest
restart: always
ports:
- "8080:8080"
```
Run the container with:
```bash
docker compose up -d
```
---
## How To Build from scratch
To clone and run this application, you'll need `git`, `java21` and `docker`.
+1 -1
View File
@@ -1,7 +1,7 @@
services:
api:
container_name: dice-tower
image: dice-tower
image: git.arindy.de/arindy/dice-tower:latest
restart: always
networks:
- reverse_proxy
+45 -1
View File
@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>de.arindy</groupId>
<artifactId>dice-tower</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>1.0.3-SNAPSHOT</version>
<properties>
<compiler-plugin.version>3.13.0</compiler-plugin.version>
@@ -21,6 +21,13 @@
<rxjava-version>2.2.8</rxjava-version>
</properties>
<scm>
<connection>scm:git:https://git.arindy.de/arindy/dice-tower.git</connection>
<developerConnection>scm:git:https://git.arindy.de/arindy/dice-tower.git</developerConnection>
<url>https://git.arindy.de/arindy/dice-tower</url>
<tag>HEAD</tag>
</scm>
<dependencyManagement>
<dependencies>
<dependency>
@@ -267,5 +274,42 @@
<quarkus.native.enabled>true</quarkus.native.enabled>
</properties>
</profile>
<profile>
<id>new-snapshot</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>next-version</id>
<goals>
<goal>parse-version</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>2.18.0</version>
<executions>
<execution>
<id>release-version</id>
<phase>validate</phase>
<goals>
<goal>set</goal>
</goals>
<configuration>
<newVersion>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.nextIncrementalVersion}-SNAPSHOT</newVersion>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
@@ -0,0 +1,35 @@
package de.arindy.dicetower
import io.quarkus.qute.TemplateInstance
import io.quarkus.runtime.annotations.RegisterForReflection
import jakarta.enterprise.context.ApplicationScoped
import jakarta.ws.rs.Consumes
import jakarta.ws.rs.GET
import jakarta.ws.rs.POST
import jakarta.ws.rs.Path
import jakarta.ws.rs.PathParam
import jakarta.ws.rs.Produces
import jakarta.ws.rs.QueryParam
import jakarta.ws.rs.core.Context
import jakarta.ws.rs.core.MediaType
import jakarta.ws.rs.sse.OutboundSseEvent
import jakarta.ws.rs.sse.Sse
import jakarta.ws.rs.sse.SseBroadcaster
import jakarta.ws.rs.sse.SseEventSink
import org.eclipse.microprofile.config.inject.ConfigProperty
import java.util.UUID
@Path("/")
@ApplicationScoped
final class IndexResource() {
@ConfigProperty(name = "quarkus.application.version")
private lateinit var version: String
@GET
@Produces(MediaType.TEXT_HTML)
fun get(): TemplateInstance {
return Templates.index(version)
}
}
@@ -9,4 +9,6 @@ object Templates {
external fun overlay(diceid: String, scale: Int?, clearAfter: Long?): TemplateInstance
@JvmStatic
external fun results(room: String, name: String?, user: String?): TemplateInstance
@JvmStatic
external fun index(version: String): TemplateInstance
}
@@ -5,7 +5,7 @@
<title>Dice-Tower</title>
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<script src="/vendor/color-picker.js"></script>
<script src="/META-INF/resources/vendor/color-picker.js"></script>
<style>
.w3-theme-l6 {
color: #000 !important;
@@ -611,6 +611,7 @@
</script>
</body>
<footer class="w3-theme-l1 w3-center w3-padding-16">
Version {version} ::
<a href="https://git.arindy.de/arindy/dice-tower" target="_blank" class="w3-hover-text-black">Dice-Tower on my
GitTea</a>
</footer>