dev to basic spring #9
25
.github/workflows/build_deploy_dev.yml
vendored
Normal file
25
.github/workflows/build_deploy_dev.yml
vendored
Normal file
|
@ -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
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -86,6 +86,8 @@
|
||||||
maven
|
maven
|
||||||
jdk22
|
jdk22
|
||||||
jre8
|
jre8
|
||||||
|
# top run actions locally
|
||||||
|
act
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
43
pom.xml
43
pom.xml
|
@ -67,15 +67,46 @@
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
|
||||||
<pluginManagement>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>com.google.cloud.tools</groupId>
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
<artifactId>jib-maven-plugin</artifactId>
|
||||||
|
<version>3.4.2</version>
|
||||||
|
<configuration>
|
||||||
|
<from>
|
||||||
|
<image>eclipse-temurin:21-jre</image>
|
||||||
|
<!-- <auth>
|
||||||
|
<username>${dockerusername}</username>
|
||||||
|
<password>${dockerpassword}</password>
|
||||||
|
</auth> -->
|
||||||
|
<platforms>
|
||||||
|
<platform>
|
||||||
|
<architecture>amd64</architecture>
|
||||||
|
<os>linux</os>
|
||||||
|
</platform>
|
||||||
|
<platform>
|
||||||
|
<architecture>arm64</architecture>
|
||||||
|
<os>linux</os>
|
||||||
|
</platform>
|
||||||
|
</platforms>
|
||||||
|
</from>
|
||||||
|
<to>
|
||||||
|
<image>git.4o1x5.dev/learningpulse/server/${project.artifactId}:${project.version}</image>
|
||||||
|
<auth>
|
||||||
|
<username>hydrabot</username>
|
||||||
|
<password>${token}</password>
|
||||||
|
</auth>
|
||||||
|
</to>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>dockerBuild</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</pluginManagement>
|
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
Reference in a new issue