From 6e3904b1534906739cdf217372cddbf373484a21 Mon Sep 17 00:00:00 2001 From: 4o1x5 <4o1x5@4o1x5.dev> Date: Thu, 30 May 2024 04:20:39 +0200 Subject: [PATCH] act to build and publish images, test --- .github/workflows/build_deploy_dev.yml | 25 +++++++++++++ flake.nix | 2 ++ pom.xml | 49 +++++++++++++++++++++----- 3 files changed, 67 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/build_deploy_dev.yml diff --git a/.github/workflows/build_deploy_dev.yml b/.github/workflows/build_deploy_dev.yml new file mode 100644 index 0000000..3a814b3 --- /dev/null +++ b/.github/workflows/build_deploy_dev.yml @@ -0,0 +1,25 @@ +name: build and publish docker image / deploy + +on: + push: + branches: ["dev"] + pull_request: + branches: ["dev"] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 21 + uses: actions/setup-java@v3 + with: + java-version: "22" + distribution: "temurin" + cache: maven + - name: Build with Maven + run: mvn -Dtoken=${{secrets.usertoken }} clean compile jib:build -e + + + diff --git a/flake.nix b/flake.nix index 7a86d72..4711d3e 100644 --- a/flake.nix +++ b/flake.nix @@ -86,6 +86,8 @@ maven jdk22 jre8 + # top run actions locally + act ]; }; }; diff --git a/pom.xml b/pom.xml index ebd117c..5bf23f8 100644 --- a/pom.xml +++ b/pom.xml @@ -61,21 +61,52 @@ - + org.springframework.boot spring-boot-maven-plugin + + com.google.cloud.tools + jib-maven-plugin + 3.4.2 + + + eclipse-temurin:21-jre + + + + amd64 + linux + + + arm64 + linux + + + + + git.4o1x5.dev/learningpulse/server/${project.artifactId}:${project.version} + + hydrabot + ${token} + + + + + + package + + dockerBuild + + + + - - - - org.springframework.boot - spring-boot-maven-plugin - - -