Update build.yml
This commit is contained in:
parent
e61c3c92e4
commit
a7f4dcf999
@ -7,7 +7,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@ -24,11 +24,14 @@ jobs:
|
|||||||
- name: Build .jar with Maven
|
- name: Build .jar with Maven
|
||||||
run: ./mvnw package spring-boot:repackage
|
run: ./mvnw package spring-boot:repackage
|
||||||
|
|
||||||
- name: Initialize QEMU
|
|
||||||
uses: docker/setup-qemu-action@v3
|
|
||||||
|
|
||||||
- name: Initialize Docker runtime
|
- name: Initialize Docker runtime
|
||||||
uses: docker/setup-buildx-action@v3
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common
|
||||||
|
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
|
||||||
|
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y docker-ce docker-ce-cli containerd.io
|
||||||
|
|
||||||
- name: Build Docker image
|
- 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" .
|
run: docker build -t walzen665/spring-cicd-test:latest --build-arg="JAR_FILE=demo-0.0.1-SNAPSHOT-spring-boot.jar" .
|
||||||
|
Loading…
x
Reference in New Issue
Block a user