From fb4e487a3aabd4472ecdf94a6fb60960f664ed24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Alberto=20=20Arg=C3=BCello=20Ram=C3=ADrez?= Date: Sat, 19 Jul 2025 18:18:04 -0500 Subject: [PATCH 1/5] add: full path for .jar archive --- deployment/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployment/Dockerfile b/deployment/Dockerfile index be28e02..09048bb 100644 --- a/deployment/Dockerfile +++ b/deployment/Dockerfile @@ -1,6 +1,6 @@ FROM eclipse-temurin:21-jdk-alpine VOLUME /tmp -COPY *.jar OpenArc.jar +COPY applications/app-service/build/libs/OpenArc.jar OpenArc.jar ENV JAVA_OPTS=" -Xshareclasses:name=cacheapp,cacheDir=/cache,nonfatal -XX:+UseContainerSupport -XX:MaxRAMPercentage=70 -Djava.security.egd=file:/dev/./urandom" # Replace with a non-root user to avoid running the container with excessive privileges USER appuser From bd83d412316e6a7cfd38c24f477f2a804433bd80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Alberto=20=20Arg=C3=BCello=20Ram=C3=ADrez?= Date: Sat, 19 Jul 2025 18:33:54 -0500 Subject: [PATCH 2/5] add: build Jar step to step github actions workflow --- .github/workflows/docker-image.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index f4963d8..d424ec1 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -14,6 +14,8 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Build JAR + run: ./gradlew :applications:app-service:build - name: Build the Docker image run: docker build . --file ./deployment/Dockerfile --tag arc:$(date +%s) - shell: bash From b2df790bd350c75d6c25d489fe1a44df40f4d120 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Alberto=20=20Arg=C3=BCello=20Ram=C3=ADrez?= Date: Sat, 19 Jul 2025 18:38:02 -0500 Subject: [PATCH 3/5] udpate: Build JAR task --- .github/workflows/docker-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index d424ec1..2a4423f 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -15,7 +15,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Build JAR - run: ./gradlew :applications:app-service:build + run: ./gradlew app-service:build - name: Build the Docker image run: docker build . --file ./deployment/Dockerfile --tag arc:$(date +%s) - shell: bash From eab9851cfad7a9884f48b2a1323ead6daba4beb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Alberto=20=20Arg=C3=BCello=20Ram=C3=ADrez?= Date: Sat, 19 Jul 2025 18:42:19 -0500 Subject: [PATCH 4/5] update: Build JAR task --- .github/workflows/docker-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 2a4423f..f9e8dcd 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -15,7 +15,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Build JAR - run: ./gradlew app-service:build + run: ./gradlew build - name: Build the Docker image run: docker build . --file ./deployment/Dockerfile --tag arc:$(date +%s) - shell: bash From 6bda9fbb88a0b90c4ab336fd48f05c937f7367fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Alberto=20=20Arg=C3=BCello=20Ram=C3=ADrez?= Date: Sat, 19 Jul 2025 18:47:58 -0500 Subject: [PATCH 5/5] add:java temurin --- .github/workflows/docker-image.yml | 33 ++++++++++++++++++------------ 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index f9e8dcd..1e2ad7f 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -1,10 +1,12 @@ name: Docker Image CI -on: +'on': push: - branches: [ "main" ] + branches: + - main pull_request: - branches: [ "main" ] + branches: + - main jobs: @@ -13,13 +15,18 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - name: Build JAR - run: ./gradlew build - - name: Build the Docker image - run: docker build . --file ./deployment/Dockerfile --tag arc:$(date +%s) - - shell: bash - env: - SUPER_SECRET: ${{ secrets.SECRET }} - run: | - echo "$SUPER_SECRET" + - uses: actions/checkout@v4 + - name: Set up JDK 21 + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: '21' + - name: Build JAR + run: ./gradlew build + - name: Build the Docker image + run: docker build . --file ./deployment/Dockerfile --tag arc:$(date +%s) + - shell: bash + env: + SUPER_SECRET: ${{ secrets.SECRET }} + run: | + echo "$SUPER_SECRET" \ No newline at end of file