Skip to content

Commit ccabe31

Browse files
author
Abhishek Malvadkar
committed
Added github action config and Dockerfile
1 parent 77f7055 commit ccabe31

File tree

4 files changed

+46
-2
lines changed

4 files changed

+46
-2
lines changed

.github/workflows/Dev-CI.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
uses: actions/setup-java@v4
1919
with:
2020
java-version: '21'
21-
distribution: 'zulu'
21+
distribution: 'temurin'
2222
cache: 'maven'
2323

2424
- name: Cache Maven packages

.github/workflows/Dev.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Deploy To Dev Env
2+
3+
env:
4+
APP_NAME: tms-service-configuration
5+
6+
on:
7+
workflow_dispatch
8+
9+
jobs:
10+
build:
11+
name: Build
12+
runs-on: ubuntu-latest
13+
permissions:
14+
packages: write
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Setup Java
20+
uses: actions/setup-java@v4
21+
with:
22+
java-version: '21'
23+
distribution: 'temurin'
24+
cache: 'maven'
25+
26+
- name: Build with Maven
27+
run: ./mvnw --no-transfer-progress clean verify
28+
29+
- name: 'Login to GitHub Container Registry'
30+
uses: docker/login-action@v3
31+
with:
32+
registry: ghcr.io
33+
username: ${{github.actor}}
34+
password: ${{secrets.GITHUB_TOKEN}}
35+
36+
- name: Build and upload dev docker image to GHCR
37+
run: |
38+
docker build . --tag ghcr.io/${{ github.actor }}/dev-${{ env.APP_NAME }}:latest
39+
docker push ghcr.io/${{ github.actor }}/dev-${{ env.APP_NAME }}:latest

Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM eclipse-temurin:21.0.4_7-jre
2+
MAINTAINER "Abhishek M"
3+
COPY target/tms-service-configuration.jar /app/app.jar
4+
WORKDIR /app
5+
ENTRYPOINT ["java", "-jar", "app.jar"]

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105
</dependencyManagement>
106106

107107
<build>
108-
<finalName>${artifactId}</finalName>
108+
<finalName>${project.artifactId}</finalName>
109109
<plugins>
110110
<plugin>
111111
<groupId>org.springframework.boot</groupId>

0 commit comments

Comments
 (0)