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
|
||||
|
||||
|
||||
|
43
pom.xml
43
pom.xml
|
@ -67,15 +67,46 @@
|
|||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<groupId>com.google.cloud.tools</groupId>
|
||||
<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>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
|
|
Reference in a new issue