Refactor workflows - user reusable workflows (#2504)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
24
.github/workflows/vulnerability-scan.yaml
vendored
Normal file
24
.github/workflows/vulnerability-scan.yaml
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
name: Vulnerability Scan
|
||||
|
||||
on:
|
||||
# enable running the workflow manually
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
# run every night at 4:00 AM (UTC)
|
||||
- cron: '0 4 * * *'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
jobs:
|
||||
trivy-scan:
|
||||
# only on original eclipse-hawkbit/hawkbit repo or when manually triggered
|
||||
if: github.repository == 'eclipse-hawkbit/hawkbit' || github.event_name == 'workflow_dispatch'
|
||||
uses: ./.github/workflows/reusable_workflow_trivy-scan.yaml
|
||||
permissions:
|
||||
contents: read
|
||||
security-events: write
|
||||
with:
|
||||
ref: ${{ github.ref }}
|
||||
upload: ${{ github.ref == 'refs/heads/master' }}
|
||||
Reference in New Issue
Block a user