diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..cc911c3 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,39 @@ +name: Build +on: [push, pull_request, workflow_dispatch] +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v3 + with: + lfs: true + - name: Cache Maven packages + uses: actions/cache@v1 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: 17 + distribution: adopt + architecture: x64 + cache: maven + server-id: philterd-repository-snapshots + server-username: MAVEN_USERNAME + server-password: MAVEN_PASSWORD + - name: Build + run: mvn --batch-mode --update-snapshots test + env: + MAVEN_USERNAME: ${{ secrets.PHILTERD_ARTIFACTS_USER }} + MAVEN_PASSWORD: ${{ secrets.PHILTERD_ARTIFACTS_TOKEN }} + - name: Deploy + if: ${{ github.ref == 'refs/heads/main' }} + run: mvn --batch-mode --update-snapshots package deploy + env: + MAVEN_USERNAME: ${{ secrets.PHILTERD_ARTIFACTS_USER }} + MAVEN_PASSWORD: ${{ secrets.PHILTERD_ARTIFACTS_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/owasp.yml b/.github/workflows/owasp.yml new file mode 100644 index 0000000..c37073f --- /dev/null +++ b/.github/workflows/owasp.yml @@ -0,0 +1,27 @@ +name: OWASP +on: [workflow_dispatch] +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v3 + with: + lfs: true + - name: Cache Maven packages + uses: actions/cache@v1 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: 17 + distribution: adopt + architecture: x64 + cache: maven + - name: Build and Test + run: mvn --batch-mode --update-snapshots package -Powasp -DnvdApiKey=${{ secrets.NVD_API_KEY }}