diff --git a/.gitea/workflows/integration.yaml b/.gitea/workflows/integration.yaml new file mode 100644 index 0000000..a936229 --- /dev/null +++ b/.gitea/workflows/integration.yaml @@ -0,0 +1,30 @@ +name: Build + +on: + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-24.04 + + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Docker Login + uses: docker/login-action@v3 + with: + registry: ${{ secrets.DOCKER_REGISTRY }} + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build and push image + uses: docker/build-push-action@v6 + with: + context: . + file: ./Dockerfile + platforms: linux/amd64 + push: true + tags: ${{ secrets.DOCKER_REGISTRY }}/${{ secrets.DOCKER_IMAGE }}:${{ gitea.sha }} \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..9bbe253 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +FROM gradle:8-jdk17 AS builder +WORKDIR /app +COPY . . +RUN gradle bootJar --no-daemon + +FROM amazoncorretto:17 +WORKDIR /app +EXPOSE 8080 +COPY --from=builder /app/build/libs/*.jar app.jar +ENTRYPOINT ["java", "-jar", "app.jar"] \ No newline at end of file