Skip to content
Open
19 changes: 11 additions & 8 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
Expand All @@ -27,14 +27,17 @@ jobs:
runs-on: ubuntu-latest
needs: build_test
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- run: mvn --batch-mode --update-snapshots verify
- run: mkdir staging && cp target/*.jar staging
- uses: actions/upload-artifact@v3
- name: Verify with Maven
run: mvn --batch-mode --update-snapshots verify
- name: Create Staging Directory and Copy JAR to Staging
run: mkdir staging && cp target/*.jar staging
- uses: actions/checkout@v4

with:
name: Package
path: staging
Expand All @@ -45,7 +48,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Download artifact
uses: actions/download-artifact@v3
uses: actions/checkout@v4
with:
name: Package
- name: Archive app content
Expand Down Expand Up @@ -79,6 +82,6 @@ jobs:
# - uses: actions/checkout@v3
# - name: Build and push Docker image
# run: |
# docker build -f Dockerfile -t ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_REPO_NAME }}:latest .
# docker build -f Dockerfile -t ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_REPO_NAME }}:latest
# docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
# docker push ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_REPO_NAME }}:latest
# docker push ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_REPO_NAME }}:latest
Loading