-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
76 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ | |
# SPDX-License-Identifier: EPL-2.0 | ||
# | ||
|
||
name: commit-check | ||
name: Commit Check | ||
|
||
on: [push, pull_request] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# | ||
# Copyright (c) 2023 Contributors to the Eclipse Foundation | ||
# | ||
# See the NOTICE file(s) distributed with this work for additional | ||
# information regarding copyright ownership. | ||
# | ||
# This program and the accompanying materials are made available under the | ||
# terms of the Eclipse Public License 2.0 which is available at | ||
# http://www.eclipse.org/legal/epl-2.0 | ||
# | ||
# SPDX-License-Identifier: EPL-2.0 | ||
# | ||
|
||
name: Build and Push Docker Image | ||
|
||
on: workflow_dispatch | ||
|
||
jobs: | ||
docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- id: read-version | ||
run: | | ||
version=$(head -n 1 version) | ||
echo "::set-output name=version::$version" | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME}} | ||
password: ${{ secrets.DOCKER_PASSWORD}} | ||
- name: Build and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: eclipsejifa/jifa:${{ steps.read-version.outputs.version }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,14 @@ | ||
FROM --platform=linux/amd64 eclipse-temurin:17.0.5_8-jdk-alpine | ||
WORKDIR /wd | ||
FROM node:18 AS build | ||
RUN apt-get update && apt-get install openjdk-17-jdk -y | ||
WORKDIR /workspace/ | ||
COPY . /workspace/ | ||
RUN --mount=type=cache,target=/root/.gradle ./gradlew clean build -x test | ||
RUN mkdir -p server/build/dependency && (cd server/build/dependency; jar -xf ../libs/jifa.jar) | ||
|
||
ARG BUILD_JAR=jifa.jar | ||
|
||
COPY ./server/build/libs/${BUILD_JAR} jifa.jar | ||
|
||
CMD ["java","-jar","/wd/jifa.jar"] | ||
FROM eclipse-temurin:17-jdk | ||
VOLUME /tmp | ||
ARG DEPENDENCY=/workspace/server/build/dependency | ||
COPY --from=build ${DEPENDENCY}/BOOT-INF/lib /jifa/lib | ||
COPY --from=build ${DEPENDENCY}/META-INF /jifa/META-INF | ||
COPY --from=build ${DEPENDENCY}/BOOT-INF/classes /jifa | ||
ENTRYPOINT ["java","-Djdk.util.zip.disableZip64ExtraFieldValidation=true","-cp","jifa:jifa/lib/*","org.eclipse.jifa.server.Launcher"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters