Added dockerfile build
This commit is contained in:
parent
d1f23b1969
commit
1e1c14f75a
@ -18,8 +18,19 @@ jobs:
|
|||||||
distribution: 'adopt'
|
distribution: 'adopt'
|
||||||
- name: Grant execute permission for mvnw
|
- name: Grant execute permission for mvnw
|
||||||
run: chmod +x ./mvnw
|
run: chmod +x ./mvnw
|
||||||
|
|
||||||
- name: Build with Maven
|
- name: Build with Maven
|
||||||
run: ./mvnw package spring-boot:repackage
|
run: ./mvnw package spring-boot:repackage
|
||||||
|
|
||||||
|
- name: Build Docker image
|
||||||
|
run: docker build -t walzen665/spring-cicd-test:latest --build-arg="JAR_FILE=demo-0.0.1-SNAPSHOT-spring-boot.jar" .
|
||||||
|
|
||||||
|
- name: Log in to Gitea Docker Registry
|
||||||
|
run: echo ${{ secrets.GITEAREGISTRYTOKEN }} | docker login -u ${{ secrets.GITEAREGISTRYUSERNAME }} --password-stdin https://git.walzen665.de
|
||||||
|
|
||||||
|
- name: Push Docker Image to Gitea
|
||||||
|
run: docker push walzen665/spring-cicd-test:latest
|
||||||
|
|
||||||
- name: Upload Artifact
|
- name: Upload Artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
|
5
Dockerfile
Normal file
5
Dockerfile
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
FROM eclipse-temurin:17-jdk-alpine
|
||||||
|
VOLUME /tmp
|
||||||
|
ARG JAR_FILE
|
||||||
|
COPY ${JAR_FILE} app.jar
|
||||||
|
ENTRYPOINT ["java","-jar","/app.jar"]
|
Loading…
x
Reference in New Issue
Block a user