mirror of
https://github.com/ViaVersion/ViaProxy.git
synced 2024-11-21 10:38:28 -05:00
Build using GH actions
This commit is contained in:
parent
ca4014f130
commit
d5d44806a9
2 changed files with 13 additions and 10 deletions
10
.github/workflows/build-docker.yml
vendored
10
.github/workflows/build-docker.yml
vendored
|
@ -14,6 +14,16 @@ jobs:
|
|||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Validate Gradle Wrapper
|
||||
uses: gradle/wrapper-validation-action@v1
|
||||
- name: Set up JDK 21
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 21
|
||||
check-latest: true
|
||||
- name: Build with Gradle
|
||||
run: ./gradlew build
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Log into registry ${{ env.REGISTRY }}
|
||||
|
|
13
Dockerfile
13
Dockerfile
|
@ -1,11 +1,4 @@
|
|||
FROM --platform=$BUILDPLATFORM gradle:jdk17 as builder
|
||||
WORKDIR /build
|
||||
COPY build.gradle settings.gradle gradle.properties ./
|
||||
COPY .git .git
|
||||
COPY src src
|
||||
RUN gradle --no-daemon build
|
||||
|
||||
FROM --platform=$TARGETPLATFORM eclipse-temurin:21-jre-alpine
|
||||
WORKDIR /app
|
||||
COPY --from=builder /build/build/libs/ViaProxy-*.jar ViaProxy.jar
|
||||
ENTRYPOINT ["java", "-jar", "ViaProxy.jar"]
|
||||
WORKDIR /app/run
|
||||
COPY /build/libs/ViaProxy-*.jar /app/ViaProxy.jar
|
||||
ENTRYPOINT ["java", "-jar", "/app/ViaProxy.jar", "config", "viaproxy.yml"]
|
||||
|
|
Loading…
Reference in a new issue