Skip to content

Commit 7a58743

Browse files
committed
ci: add scheduled run of GHA CI
This is to ensure that our CI is not rotting away even if there are no new PRs or merges. This is especially useful for release branches which tend to cease working over time due to some external reasons. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
1 parent 45ece5c commit 7a58743

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/scheduled.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: scheduled
2+
on:
3+
schedule:
4+
# Runs at 00:00 UTC every Sunday, Tuesday, Thursday.
5+
- cron: '0 0 * * 0,2,4'
6+
workflow_dispatch:
7+
permissions:
8+
contents: read
9+
actions: write
10+
11+
jobs:
12+
trigger-workflow:
13+
strategy:
14+
matrix:
15+
branch: ["main", "release-1.3"]
16+
wf_id: ["validate.yml", "test.yml"]
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Trigger ${{ matrix.wf_id }} workflow on ${{ matrix.branch}} branch
20+
uses: actions/github-script@v7
21+
with:
22+
github-token: ${{ secrets.GITHUB_TOKEN }}
23+
script: |
24+
await github.rest.actions.createWorkflowDispatch({
25+
owner: context.repo.owner,
26+
repo: context.repo.repo,
27+
workflow_id: '${{ matrix.wf_id }}',
28+
ref: '${{ matrix.branch }}'
29+
});

0 commit comments

Comments
 (0)