diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 8cefe64..1fa90f4 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -1,6 +1,6 @@ name: test -on: [push] +on: [push, pull_request] jobs: test: diff --git a/Dockerfile b/Dockerfile index c608650..c5cf2f5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,7 @@ -FROM clojure:latest +ARG BUILD_FROM=clojure:latest +ARG RUN_FROM=eclipse-temurin:8u422-b05-jre-noble + +FROM ${BUILD_FROM} AS builder RUN mkdir -p /usr/src/app WORKDIR /usr/src/app @@ -7,4 +10,10 @@ COPY . /usr/src/app RUN clojure -T:build uber && \ mv target/emqx-snowflake-proxy-*-standalone.jar app-standalone.jar +FROM ${RUN_FROM} AS runner + +COPY --from=builder /usr/src/app/app-standalone.jar /opt/proxy/app-standalone.jar + +WORKDIR /opt/proxy + CMD ["java", "-jar", "app-standalone.jar"]