Update .gitea/workflows/build.yml
This commit is contained in:
parent
7292a7a4be
commit
27914490be
@ -6,7 +6,7 @@ on:
|
|||||||
- main
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build-jar:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@ -38,7 +38,9 @@ jobs:
|
|||||||
apt-get update
|
apt-get update
|
||||||
apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin -y
|
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
|
- 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" .
|
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
|
- name: Log in to Gitea Docker Registry
|
||||||
run: echo ${{ secrets.GITEAREGISTRYTOKEN }} | docker login -u ${{ secrets.GITEAREGISTRYUSERNAME }} --password-stdin https://git.walzen665.de
|
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
|
- name: Push Docker Image to Gitea
|
||||||
run: docker push git.walzen665.de/walzen665/spring-cicd-test:latest
|
run: docker push git.walzen665.de/walzen665/spring-cicd-test:latest
|
||||||
|
collect-artifacts:
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
- name: Upload Artifact
|
- name: Upload Artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user