Update .gitea/workflows/build.yml

This commit is contained in:
Max W. 2023-12-08 11:11:20 +00:00
parent 7292a7a4be
commit 27914490be

View File

@ -6,7 +6,7 @@ on:
- main
jobs:
build:
build-jar:
runs-on: ubuntu-22.04
steps:
- name: Checkout
@ -38,7 +38,9 @@ jobs:
apt-get update
apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin -y
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" .
@ -47,10 +49,13 @@ 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
- name: Upload Artifact
uses: actions/upload-artifact@v3
with: