Added dockerfile build
This commit is contained in:
parent
d1f23b1969
commit
1e1c14f75a
@ -18,8 +18,19 @@ jobs:
|
||||
distribution: 'adopt'
|
||||
- name: Grant execute permission for mvnw
|
||||
run: chmod +x ./mvnw
|
||||
|
||||
- name: Build with Maven
|
||||
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
|
||||
uses: actions/upload-artifact@v3
|
||||
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