Compare commits

...

8 Commits

Author SHA1 Message Date
siujamo 2b099a6b2c fix: use update-container-description-action instead of raw docker-pushrm
Build and Deploy / build-and-release (release) Successful in 3m20s
The raw docker run with docker-pushrm keeps failing due to WORKDIR /
mount path mismatches. Replace with the official GitHub Action wrapper
from the same author, which handles the internals correctly.
2026-06-08 14:56:54 +08:00
siujamo 0269683b68 fix: mount README.md to / not /data for docker-pushrm
Build and Deploy / build-and-release (release) Failing after 3m0s
The docker-pushrm image (busybox-based) has no WORKDIR set, defaulting
to /. FindReadmeFile() searches ./ relative to WORKDIR, so the file
must be at /README.md, not /data/ or /workspace/.
2026-06-08 14:46:19 +08:00
siujamo 3f2066f8b2 fix: update docker-pushrm README mount path from /workspace to /data
Build and Deploy / build-and-release (release) Failing after 3m49s
docker-pushrm v2 changed the WORKDIR from /workspace to /data, causing the
README push step to fail when using the :latest tag.
2026-06-08 14:14:05 +08:00
siujamo a2469c7573 docs: update application configuration example
Build and Deploy / build-and-release (release) Failing after 5m14s
2026-06-08 13:32:16 +08:00
siujamo 62fcce3005 feat: add OCI labels and README push for Docker Hub
Add OCI standard labels to Dockerfile.ci and push README.md to
Docker Hub image page via docker-pushrm in CI workflow.
2026-06-05 10:20:15 +08:00
siujamo c18a108a2b ci: fix build error
Build and Deploy / build-and-release (release) Successful in 14m20s
2026-06-05 09:40:12 +08:00
siujamo fb2732508a ci: fix build error
Build and Deploy / build-and-release (release) Failing after 11m24s
2026-06-05 09:30:28 +08:00
siujamo ceac8a3f8c ci: fix build error
Build and Deploy / build-and-release (release) Failing after 11m22s
2026-06-05 09:14:37 +08:00
4 changed files with 42 additions and 49 deletions
+19 -6
View File
@@ -50,24 +50,37 @@ jobs:
- name: Log in to Docker Hub - name: Log in to Docker Hub
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
username: ${{ secrets.DOCKER_HUB_USERNAME }} username: ${{ vars.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }} password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Generate image tags - name: Generate image tags
id: meta id: meta
run: | run: |
DOCKERHUB_USER="${{ secrets.DOCKER_HUB_USERNAME }}" DOCKERHUB_USER="${{ vars.DOCKER_HUB_USERNAME }}"
REPO_NAME=$(echo "${{ gitea.repository.name }}" | tr '[:upper:]' '[:lower:]') echo "tag_version=${DOCKERHUB_USER}/${APP_NAME}:${{ gitea.event.release.tag_name }}" >> "$GITHUB_OUTPUT"
echo "tag_version=${DOCKERHUB_USER}/${REPO_NAME}:${{ gitea.event.release.tag_name }}" >> "$GITHUB_OUTPUT" echo "tag_latest=${DOCKERHUB_USER}/${APP_NAME}:latest" >> "$GITHUB_OUTPUT"
echo "tag_latest=${DOCKERHUB_USER}/${REPO_NAME}:latest" >> "$GITHUB_OUTPUT"
- name: Build and push Docker image - name: Build and push Docker image
uses: docker/build-push-action@v6 uses: docker/build-push-action@v6
with: with:
context: . context: .
file: Dockerfile.ci file: Dockerfile.ci
build-args: JAR_FILE=${{ steps.jar.outputs.file }} build-args: |
JAR_FILE=${{ steps.jar.outputs.file }}
IMAGE_VERSION=${{ gitea.event.release.tag_name }}
IMAGE_VENDOR=${{ vars.VENDOR }}
BUILD_DATE=${{ gitea.event.release.published_at }}
push: true push: true
tags: | tags: |
${{ steps.meta.outputs.tag_version }} ${{ steps.meta.outputs.tag_version }}
${{ steps.meta.outputs.tag_latest }} ${{ steps.meta.outputs.tag_latest }}
- name: Push README to Docker Hub
uses: christian-korneck/update-container-description-action@v1
env:
DOCKER_USER: ${{ vars.DOCKER_HUB_USERNAME }}
DOCKER_PASS: ${{ secrets.DOCKER_HUB_TOKEN }}
with:
destination_container_repo: ${{ vars.DOCKER_HUB_USERNAME }}/${{ env.APP_NAME }}
provider: dockerhub
readme_file: README.md
-34
View File
@@ -1,34 +0,0 @@
variables:
GRADLE_OPTS: -Dorg.gradle.daemon=false
DOCKER_HOST: unix:///var/run/docker.sock
stages:
- release
release:
stage: release
image: amazoncorretto:21-alpine
cache:
key: gradle
paths:
- .gradle/wrapper
- .gradle/caches
before_script:
- chmod +x gradlew
- apk add --no-cache docker-cli
script:
- ./gradlew bootJar -x test -PartefactVersion="$CI_COMMIT_TAG"
- JAR_FILE=$(find build/libs -name '*.jar' | head -1)
- echo "Building Docker image for tag $CI_COMMIT_TAG with JAR $JAR_FILE"
- docker build
-f Dockerfile.ci
--build-arg JAR_FILE="$JAR_FILE"
-t "$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG"
.
- docker tag "$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG" "$CI_REGISTRY_IMAGE:latest"
- echo "Pushing image $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG"
- docker login "$CI_REGISTRY" -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD"
- docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG"
- docker push "$CI_REGISTRY_IMAGE:latest"
rules:
- if: $CI_COMMIT_TAG
+12
View File
@@ -2,6 +2,18 @@ FROM amazoncorretto:21-alpine
WORKDIR /app WORKDIR /app
ARG JAR_FILE ARG JAR_FILE
ARG IMAGE_VERSION=dev
ARG IMAGE_VENDOR=OnixByte
ARG BUILD_DATE
COPY ${JAR_FILE} app.jar COPY ${JAR_FILE} app.jar
LABEL org.opencontainers.image.title="delta-force-guide-server" \
org.opencontainers.image.description="REST API backend for managing Delta Force game firearm builds and modifications" \
org.opencontainers.image.version="${IMAGE_VERSION}" \
org.opencontainers.image.vendor="${IMAGE_VENDOR}" \
org.opencontainers.image.source="https://git.onixbyte.com/onixbyte/delta-force-guide-server" \
org.opencontainers.image.licenses="MIT" \
org.opencontainers.image.created="${BUILD_DATE}"
ENTRYPOINT ["java", "-jar", "app.jar"] ENTRYPOINT ["java", "-jar", "app.jar"]
+11 -9
View File
@@ -9,15 +9,19 @@ spring:
host: localhost host: localhost
port: 6379 port: 6379
database: 0 database: 0
# password: 6hLFVqfGPviTYukn # Uncomment if password is necessary # password: qwerty # Uncomment if password is necessary
logging: logging:
pattern: pattern:
# dateformat: dd MMM yyyy HH:mm:ss.SSS # Modify this for custom date format. # dateformat: dd MMM yyyy HH:mm:ss.SSS # Modify this for custom date format.
app: app:
common: cookie:
version: 1.3.0.8-dev # Application version, you can change to any version you like, used for communication with frontend. http-only: true
secure: false
same-site: none
path: '/'
max-age: P1D
cors: cors:
allowed-origins: # Cross-origin allowed origins allowed-origins: # Cross-origin allowed origins
- "http://localhost:5173" # Dev server for vite. - "http://localhost:5173" # Dev server for vite.
@@ -41,12 +45,10 @@ app:
issuer: dfguide.local # Issuer host issuer: dfguide.local # Issuer host
secret: qwertyuiopasdfghjklzxcvbnm123456 # JWT singing secret, a 32-byte long or longer string is recommended secret: qwertyuiopasdfghjklzxcvbnm123456 # JWT singing secret, a 32-byte long or longer string is recommended
valid-time: PT2H # JWT valid duration valid-time: PT2H # JWT valid duration
cookie: # Cookie settings. webhook:
http-only: true github:
secure: false secret: 123456
same-site: lax allowed-users: [ octotcat, onixbyte ]
path: '/'
max-age: PT2H
springdoc: springdoc:
api-docs: api-docs: