Skip to content

Update maven.yml

Update maven.yml #24

Workflow file for this run

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: Deploy Spring Boot Application to Ngrok
run: |
NGROK_URL=https://43b9-2a01-111f-b24-2b00-34f0-c23b-184f-f147.ngrok-free.app/
curl -X POST $NGROK_URL
shell: bash
- 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: ${{ steps.ngrok.outputs.url }}