From eaf21e880cb9c1b2a34e7fa952a249363579c91c Mon Sep 17 00:00:00 2001 From: shatvani Date: Thu, 31 Oct 2024 13:51:02 +0100 Subject: [PATCH] Homewrok1 maven-publish.yml fix 10 --- .github/workflows/maven-publish.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml index 6fb00c6..e031a8a 100644 --- a/.github/workflows/maven-publish.yml +++ b/.github/workflows/maven-publish.yml @@ -28,8 +28,18 @@ jobs: - name: Check Java version run: java -version - - name: Upload artifact for Docker job + - name: Build with Maven run: ./mvnw package + - name: Publish to GitHub Packages Apache Maven + run: mvn deploy + env: + GITHUB_TOKEN: ${{ github.token }} + - name: Upload artifact for Docker job + uses: actions/upload-artifact@v3 + with: + name: java-app + path: '${{ github.workspace }}/target/*.jar' + docker: @@ -41,6 +51,10 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Download artifact from Maven job + uses: actions/download-artifact@v3 + with: + name: java-app - name: Logging in to Docker run: docker login ghcr.io -u shatvani -p ${{ github.token }} - name: Build the Docker image