Update build.yml

This commit is contained in:
Max W 2023-12-08 12:21:22 +01:00
parent c3898be100
commit e34b6c388f

View File

@ -24,6 +24,9 @@ jobs:
- name: Build .jar with Maven - name: Build .jar with Maven
run: ./mvnw package spring-boot:repackage run: ./mvnw package spring-boot:repackage
build-image:
runs-on: ubuntu-22.04
steps:
- name: Initialize Docker runtime - name: Initialize Docker runtime
run: | run: |
apt-get update apt-get update
@ -37,10 +40,6 @@ jobs:
tee /etc/apt/sources.list.d/docker.list > /dev/null tee /etc/apt/sources.list.d/docker.list > /dev/null
apt-get update apt-get update
apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin -y apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin -y
build-image:
runs-on: ubuntu-22.04
steps:
- name: Build Docker image - name: Build Docker image
run: docker build -t walzen665/spring-cicd-test:latest --build-arg="JAR_FILE=target/demo-0.0.1-SNAPSHOT-spring-boot.jar" . run: docker build -t walzen665/spring-cicd-test:latest --build-arg="JAR_FILE=target/demo-0.0.1-SNAPSHOT-spring-boot.jar" .