mirror of
https://github.com/ViaVersion/ViaProxy.git
synced 2025-01-02 18:28:33 +01:00
Build using GH actions
This commit is contained in:
parent
ca4014f130
commit
d5d44806a9
10
.github/workflows/build-docker.yml
vendored
10
.github/workflows/build-docker.yml
vendored
@ -14,6 +14,16 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@v4
|
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
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
- name: Log into registry ${{ env.REGISTRY }}
|
- 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
|
FROM --platform=$TARGETPLATFORM eclipse-temurin:21-jre-alpine
|
||||||
WORKDIR /app
|
WORKDIR /app/run
|
||||||
COPY --from=builder /build/build/libs/ViaProxy-*.jar ViaProxy.jar
|
COPY /build/libs/ViaProxy-*.jar /app/ViaProxy.jar
|
||||||
ENTRYPOINT ["java", "-jar", "ViaProxy.jar"]
|
ENTRYPOINT ["java", "-jar", "/app/ViaProxy.jar", "config", "viaproxy.yml"]
|
||||||
|
Loading…
Reference in New Issue
Block a user