Skip to content

add security cron job #322

add security cron job

add security cron job #322

name: ConfigDocsGenerator Tests
on:
push:
branches:
- master
pull_request:
paths:
- '.github/workflows/configdocsgenerator_test.yml'
- 'components/inspectit-ocelot-configdocsgenerator/**'
workflow_call:
jobs:
test:
name: Test
runs-on: ubuntu-latest
env:
working-directory: ./components/inspectit-ocelot-configdocsgenerator
container: openjdk:8-jdk
steps:
- uses: actions/checkout@v2
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: test
run: ../../gradlew test
working-directory: ${{env.working-directory}}
dependency-scan:
name: Dependency Scan
runs-on: ubuntu-latest
container: openjdk:8-jdk
steps:
- uses: actions/checkout@v3
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: build
run: ./gradlew :inspectit-ocelot-configdocsgenerator:assemble
- name: Run DependencyCheck plugin
uses: dependency-check/Dependency-Check_Action@main
id: depcheck
continue-on-error: true
with:
project: inspectIT/inspectit-ocelot-configdocsgenerator
path: 'components/inspectit-ocelot-configdocsgenerator'
format: 'HTML'
args: >
--disableAssembly
--disableNodeAudit
--nvdApiKey ${{ secrets.NVD_API_KEY }}
--nvdApiDelay 10000
- name: Upload test results
uses: actions/upload-artifact@v4
with:
name: dependency-check-report-ocelot-configdocsgenerator
path: ${{ github.workspace }}/reports
# if DependencyCheck failed, the job should also fail, but only after the results were uploaded
- name: Validate DependencyCheck outcome
if: ${{ steps.depcheck.outcome == 'failure' }}
run: |
echo "DependencyCheck failed"
exit 1