Update build.yml

This commit is contained in:
Max W 2023-12-08 12:48:52 +01:00
parent 0bed4eb617
commit afae441d6c

View File

@ -23,7 +23,12 @@ jobs:
- name: Build .jar with Maven
run: ./mvnw package spring-boot:repackage
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: artifacts
path: target/*.jar
build-image:
runs-on: ubuntu-22.04
steps:
@ -41,6 +46,11 @@ jobs:
apt-get update
apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin -y
- name: Download .jar Artifact
uses: actions/download-artifact@v3
with:
name: jar-artifact
- name: List files and path in the repository
run: |
ls -la
@ -55,16 +65,6 @@ jobs:
- 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:
- name: Push Docker Image to Gitea
run: docker push git.walzen665.de/walzen665/spring-cicd-test:latest
collect-artifacts:
runs-on: ubuntu-22.04
steps:
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: artifacts
path: target/*.jar
run: docker push git.walzen665.de/walzen665/spring-cicd-test:latest