Skip to content

Commit

Permalink
feat: adding scheduing to security.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielg2020 committed May 13, 2024
1 parent b4dc58d commit 772a471
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion .github/workflows/security.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,34 @@ on:
project:
type: string
required: true
schedule:
# Weekly on Monday at 00:00 UTC
- cron: 0 0 * * 1

jobs:
dependency-scan:
name: Dependency Scan
runs-on: ubuntu-latest
strategy:
matrix:
project:
- api
- selfserve
- internal
env:
# Temporary until this repository becomes a mono-repository: https://dvsa.atlassian.net/browse/VOL-4961.
REMOTE_REPOSITORY: ${{ inputs.project == 'api' && 'dvsa/olcs-backend' || format('dvsa/olcs-{0}', inputs.project) }}
SCHEDULE_REMOTE_REPOSITORY: ${{ matrix.project == 'api' && 'dvsa/olcs-backend' || format('dvsa/olcs-{0}', matrix.project) }}
steps:
- uses: actions/checkout@v4
- name: Scheduled Scan
if: github.event_name == 'shedule'
uses: actions/checkout@v4
with:
repository: ${{ env.SCHEDULE_REMOTE_REPOSITORY }}
ref: ${{ inputs.ref || null }}
path: app/${{ matrix.project }}
- name: Non-Scheduled Scan
uses: actions/checkout@v4
with:
repository: ${{ env.REMOTE_REPOSITORY }}
ref: ${{ inputs.ref || null }}
Expand Down

0 comments on commit 772a471

Please sign in to comment.