Skip to content

Commit

Permalink
add docker jib builds
Browse files Browse the repository at this point in the history
  • Loading branch information
hex-agon committed Jul 11, 2023
1 parent 39d4ef2 commit e9e93a5
Show file tree
Hide file tree
Showing 5 changed files with 95 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/build-images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Build Images

on: workflow_dispatch

jobs:
build:
runs-on: ubuntu-latest

permissions:
packages: write

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up JDK
uses: actions/setup-java@v2
with:
distribution: temurin
java-version: 20
cache: maven

- name: Compile
run: mvn compile --no-transfer-progress

- name: Run Jib
run: mvn jib:build --no-transfer-progress
21 changes: 21 additions & 0 deletions game-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,25 @@
<version>${project.version}</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<version>${jib.version}</version>
<configuration>
<from>
<image>${jib.base.image}</image>
</from>
<to>
<image>ghcr.io/hex-agon/alter-pangya-game-server:latest</image>
</to>
<container>
<appRoot>/alter-pangya/game-server</appRoot>
</container>
</configuration>
</plugin>
</plugins>
</build>
</project>
21 changes: 21 additions & 0 deletions login-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,25 @@
<version>${project.version}</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<version>${jib.version}</version>
<configuration>
<from>
<image>${jib.base.image}</image>
</from>
<to>
<image>ghcr.io/hex-agon/alter-pangya-login-server:latest</image>
</to>
<container>
<appRoot>/alter-pangya/login-server</appRoot>
</container>
</configuration>
</plugin>
</plugins>
</build>
</project>
2 changes: 2 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
<maven.compiler.release>20</maven.compiler.release>
<kotlin.compiler.jvmTarget>19</kotlin.compiler.jvmTarget>
<kotlin.version>1.9.0</kotlin.version>
<jib.base.image>eclipse-temurin:20-jre-alpine</jib.base.image>
<jib.version>3.3.2</jib.version>
<jackson.version>2.15.2</jackson.version>
<netty.version>4.1.94.Final</netty.version>
<slf4j.version>2.0.7</slf4j.version>
Expand Down
24 changes: 24 additions & 0 deletions resources-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,28 @@
<version>${project.version}</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<version>${jib.version}</version>
<configuration>
<from>
<image>${jib.base.image}</image>
</from>
<to>
<image>ghcr.io/hex-agon/alter-pangya-resources-server:latest</image>
</to>
<container>
<appRoot>/alter-pangya/resources-server</appRoot>
<ports>
<port>50009/tcp</port>
</ports>
</container>
</configuration>
</plugin>
</plugins>
</build>
</project>

0 comments on commit e9e93a5

Please sign in to comment.