- Dockerfile: eclipse-temurin:25-alpine, exposes port 8080 - build.yml: builds on every branch push with Java 25 - deploy.yml: builds and pushes Docker image on v* tags Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
21
.gitea/workflows/build.yml
Normal file
21
.gitea/workflows/build.yml
Normal file
@@ -0,0 +1,21 @@
|
||||
name: Build
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '*'
|
||||
jobs:
|
||||
build:
|
||||
runs-on: standard-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Java
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '25'
|
||||
cache: 'gradle'
|
||||
|
||||
- name: Build
|
||||
run: ./gradlew build --no-daemon
|
||||
32
.gitea/workflows/deploy.yml
Normal file
32
.gitea/workflows/deploy.yml
Normal file
@@ -0,0 +1,32 @@
|
||||
name: Deploy
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
jobs:
|
||||
build:
|
||||
runs-on: standard-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Java
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '25'
|
||||
cache: 'gradle'
|
||||
|
||||
- name: Build Jar
|
||||
run: ./gradlew bootJar
|
||||
|
||||
- name: Build Container
|
||||
run: docker build --tag gitea.seeseepuff.be/seeseemelk/webgit:${{github.ref_name}} .
|
||||
|
||||
- name: Login
|
||||
with:
|
||||
package_rw: ${{ secrets.PACKAGE_RW }}
|
||||
run: docker login gitea.seeseepuff.be -u seeseemelk -p ${{ secrets.PACKAGE_RW }}
|
||||
|
||||
- name: Push Container
|
||||
run: docker push gitea.seeseepuff.be/seeseemelk/webgit:${{github.ref_name}}
|
||||
5
Dockerfile
Normal file
5
Dockerfile
Normal file
@@ -0,0 +1,5 @@
|
||||
FROM eclipse-temurin:25-alpine
|
||||
WORKDIR /app
|
||||
ADD ./build/libs/webgit-0.0.1-SNAPSHOT.jar /app/webgit.jar
|
||||
ENTRYPOINT ["java", "-jar", "webgit.jar"]
|
||||
EXPOSE 8080/tcp
|
||||
Reference in New Issue
Block a user