Update build.yml
This commit is contained in:
parent
e61c3c92e4
commit
a7f4dcf999
@ -7,7 +7,7 @@ on:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
@ -24,11 +24,14 @@ jobs:
|
||||
- name: Build .jar with Maven
|
||||
run: ./mvnw package spring-boot:repackage
|
||||
|
||||
- name: Initialize QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- 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
|
||||
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