Update maven.yml #27
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI/CD Pipeline | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
name: Build and Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '17' | |
distribution: 'adopt' | |
- name: Build with Maven | |
run: mvn -B package --file pom.xml | |
- name: Run Tests | |
run: mvn test | |
deploy_and_test: | |
name: Deploy with Ngrok and Test | |
runs-on: ubuntu-latest | |
needs: build | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- name: Run SOOS DAST test | |
uses: soos-io/soos-dast-github-action@v2 | |
with: | |
client_id: pj43rhf2l | |
api_key: NjQ1ODExYTQtMzc5Mi00ODhlLThkMTctMWM1OGFhNGFkNTdh | |
project_name: "magazyn-server" | |
scan_mode: "baseline" | |
api_url: "https://api.soos.io/api/" | |
target_url: "https://43b9-2a01-111f-b24-2b00-34f0-c23b-184f-f147.ngrok-free.app/" |