From afae441d6ca1135d6ec14c29ba67b9406ee523b9 Mon Sep 17 00:00:00 2001 From: Max W <66736561+Walzen665@users.noreply.github.com> Date: Fri, 8 Dec 2023 12:48:52 +0100 Subject: [PATCH] Update build.yml --- .gitea/workflows/build.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 2883d8d..61cacaf 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -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 \ No newline at end of file + run: docker push git.walzen665.de/walzen665/spring-cicd-test:latest \ No newline at end of file