add gitea container build job

This commit is contained in:
2025-07-15 17:13:42 -04:00
parent d9485d2fdf
commit d08e02a46c
2 changed files with 33 additions and 1 deletions

View File

@@ -0,0 +1,32 @@
name: Minecraft Java Image
run-name: Build and Push the Minecraft Java Image
on:
push:
paths:
- Dockerfile
- IMAGE
- VERSION
- .gitea/workflows/minecraft.yaml
schedule:
- cron: '@daily'
jobs:
build-and-push-ddns:
runs-on: ubuntu-latest
if: gitea.ref == 'refs/heads/main'
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Login to Gitea Registry
uses: docker/login-action@v2
with:
registry: gitea.reeseapps.com
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build and push Docker image
uses: https://github.com/docker/build-push-action@v5
with:
context: ${{ gitea.workspace }}
file: ${{ gitea.workspace }}/Dockerfile
push: true
tags: "gitea.reeseapps.com/services/minecraft:latest,gitea.reeseapps.com/services/minecraft:${{gitea.sha}}"
no-cache: true

View File

@@ -1,4 +1,4 @@
FROM openjdk:latest FROM docker.io/openjdk:latest
RUN groupadd -r minecraft -g 2000 RUN groupadd -r minecraft -g 2000
RUN useradd --no-log-init minecraft -u 2000 -g 2000 -m RUN useradd --no-log-init minecraft -u 2000 -g 2000 -m