act to build and publish images, test
Some checks failed
build and publish docker image / deploy / build (push) Failing after 20s

This commit is contained in:
2005 2024-05-30 04:20:39 +02:00
parent 24eae7839c
commit 6e3904b153
3 changed files with 67 additions and 9 deletions

25
.github/workflows/build_deploy_dev.yml vendored Normal file
View 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

View file

@ -86,6 +86,8 @@
maven maven
jdk22 jdk22
jre8 jre8
# top run actions locally
act
]; ];
}; };
}; };

43
pom.xml
View file

@ -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>