Skip to content

Commit 8fcf15d

Browse files
committed
[CI] Schedule Trivy scan for maintenance branches
1 parent 6854994 commit 8fcf15d

File tree

3 files changed

+51
-1
lines changed

3 files changed

+51
-1
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Trivy Vulnerability Scan (Repo mode) Dispatcher (1.0.x)
2+
3+
on:
4+
schedule:
5+
- cron: '0 15 * * */3' # Once every 3 day at 15:00 UTC
6+
workflow_dispatch:
7+
8+
jobs:
9+
dispatch_trivy_workflow:
10+
name: Dispatch scan workflow
11+
if: github.repository == 'spring-projects/spring-pulsar'
12+
strategy:
13+
matrix:
14+
# List of active maintenance branches.
15+
branch: [ 1.0.x ]
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 1
22+
- name: Dispatch
23+
env:
24+
GH_TOKEN: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
25+
run: gh workflow run trivy-scan.yml -r ${{ matrix.branch }}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Trivy Vulnerability Scan (Repo mode) Dispatcher (1.1.x)
2+
3+
on:
4+
schedule:
5+
- cron: '0 16 * * */3' # Once every 3 day at 16:00 UTC
6+
workflow_dispatch:
7+
8+
jobs:
9+
dispatch_trivy_workflow:
10+
name: Dispatch scan workflow
11+
if: github.repository == 'spring-projects/spring-pulsar'
12+
strategy:
13+
matrix:
14+
# List of active maintenance branches.
15+
branch: [ 1.1.x ]
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 1
22+
- name: Dispatch
23+
env:
24+
GH_TOKEN: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
25+
run: gh workflow run trivy-scan.yml -r ${{ matrix.branch }}

.github/workflows/trivy-scan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ on:
2626
required: false
2727
type: boolean
2828
schedule:
29-
- cron: '0 14 * * */3' # Once every 3 day at 2pm UTC
29+
- cron: '0 14 * * */3' # Once every 3 day at 14:00 UTC
3030

3131
jobs:
3232
run_trivy_scan:

0 commit comments

Comments
 (0)