Update build.yml
This commit is contained in:
parent
c3898be100
commit
e34b6c388f
@ -24,6 +24,9 @@ jobs:
|
||||
- name: Build .jar with Maven
|
||||
run: ./mvnw package spring-boot:repackage
|
||||
|
||||
build-image:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Initialize Docker runtime
|
||||
run: |
|
||||
apt-get update
|
||||
@ -37,21 +40,17 @@ jobs:
|
||||
tee /etc/apt/sources.list.d/docker.list > /dev/null
|
||||
apt-get update
|
||||
apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin -y
|
||||
- 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" .
|
||||
|
||||
build-image:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- 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" .
|
||||
- name: Tag Docker image
|
||||
run: docker tag walzen665/spring-cicd-test:latest git.walzen665.de/walzen665/spring-cicd-test:latest
|
||||
|
||||
- name: Tag Docker image
|
||||
run: docker tag walzen665/spring-cicd-test:latest git.walzen665.de/walzen665/spring-cicd-test:latest
|
||||
|
||||
- name: Log in to Gitea Docker Registry
|
||||
run: echo ${{ secrets.GITEAREGISTRYTOKEN }} | docker login -u ${{ secrets.GITEAREGISTRYUSERNAME }} --password-stdin https://git.walzen665.de
|
||||
- name: Log in to Gitea Docker Registry
|
||||
run: echo ${{ secrets.GITEAREGISTRYTOKEN }} | docker login -u ${{ secrets.GITEAREGISTRYUSERNAME }} --password-stdin https://git.walzen665.de
|
||||
push-image:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Push Docker Image to Gitea
|
||||
run: docker push git.walzen665.de/walzen665/spring-cicd-test:latest
|
||||
collect-artifacts:
|
||||
|
Loading…
x
Reference in New Issue
Block a user