Update build.yml
This commit is contained in:
parent
0bed4eb617
commit
afae441d6c
@ -24,6 +24,11 @@ jobs:
|
|||||||
- name: Build .jar with Maven
|
- name: Build .jar with Maven
|
||||||
run: ./mvnw package spring-boot:repackage
|
run: ./mvnw package spring-boot:repackage
|
||||||
|
|
||||||
|
- name: Upload Artifact
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: artifacts
|
||||||
|
path: target/*.jar
|
||||||
build-image:
|
build-image:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
@ -41,6 +46,11 @@ 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
|
||||||
|
|
||||||
|
- name: Download .jar Artifact
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: jar-artifact
|
||||||
|
|
||||||
- name: List files and path in the repository
|
- name: List files and path in the repository
|
||||||
run: |
|
run: |
|
||||||
ls -la
|
ls -la
|
||||||
@ -55,16 +65,6 @@ 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
|
|
||||||
steps:
|
|
||||||
- name: Upload Artifact
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: artifacts
|
|
||||||
path: target/*.jar
|
|
Loading…
x
Reference in New Issue
Block a user