File tree Expand file tree Collapse file tree 3 files changed +45
-4
lines changed Expand file tree Collapse file tree 3 files changed +45
-4
lines changed Original file line number Diff line number Diff line change 1+ # This enables periodical execution of CI jobs in branches we maintain.
2+ #
3+ # CI jobs are triggered through here (instead of adding "schedule:" to the
4+ # appropriate files) because scheduled jobs are only run on the main branch.
5+ # In other words, it's a way to run periodical CI for other branches.
6+
7+ name : scheduled
8+ on :
9+ schedule :
10+ # Runs at 00:00 UTC every Sunday, Tuesday, Thursday.
11+ - cron : ' 0 0 * * 0,2,4'
12+ workflow_dispatch :
13+ permissions :
14+ contents : read
15+ actions : write
16+
17+ jobs :
18+ trigger-workflow :
19+ strategy :
20+ matrix :
21+ branch : ["main", "release-1.3"]
22+ wf_id : ["validate.yml", "test.yml"]
23+ runs-on : ubuntu-latest
24+ steps :
25+ - name : Trigger ${{ matrix.wf_id }} workflow on ${{ matrix.branch}} branch
26+ uses : actions/github-script@v7
27+ with :
28+ github-token : ${{ secrets.GITHUB_TOKEN }}
29+ script : |
30+ await github.rest.actions.createWorkflowDispatch({
31+ owner: context.repo.owner,
32+ repo: context.repo.repo,
33+ workflow_id: '${{ matrix.wf_id }}',
34+ ref: '${{ matrix.branch }}'
35+ });
Original file line number Diff line number Diff line change 1010 - main
1111 - release-*
1212 pull_request :
13+ workflow_dispatch :
1314permissions :
1415 contents : read
1516
@@ -32,12 +33,12 @@ jobs:
3233 # Disable most of criu-dev jobs, as they are expensive
3334 # (need to compile criu) and don't add much value/coverage.
3435 - criu : criu-dev
35- go-version : 1.22 .x
36+ go-version : 1.23 .x
3637 - criu : criu-dev
3738 rootless : rootless
3839 - criu : criu-dev
3940 race : -race
40- - go-version : 1.22 .x
41+ - go-version : 1.23 .x
4142 os : actuated-arm64-6cpu-8gb
4243 - race : " -race"
4344 os : actuated-arm64-6cpu-8gb
Original file line number Diff line number Diff line change 77 - main
88 - release-*
99 pull_request :
10+ workflow_dispatch :
1011env :
1112 GO_VERSION : 1.24
1213permissions :
@@ -157,22 +158,26 @@ jobs:
157158 contents : read
158159 pull-requests : read
159160 runs-on : ubuntu-24.04
160- # Only check commits on pull requests.
161- if : github.event_name == 'pull_request'
162161 steps :
163162 - name : get pr commits
163+ if : github.event_name == 'pull_request' # Only check commits on pull requests.
164164 id : ' get-pr-commits'
165165 uses :
tim-actions/[email protected] 166166 with :
167167 token : ${{ secrets.GITHUB_TOKEN }}
168168
169169 - name : check subject line length
170+ if : github.event_name == 'pull_request' # Only check commits on pull requests.
170171 uses :
tim-actions/[email protected] 171172 with :
172173 commits : ${{ steps.get-pr-commits.outputs.commits }}
173174 pattern : ' ^.{0,72}(\n.*)*$'
174175 error : ' Subject too long (max 72)'
175176
177+ - name : succeed (not a PR) # Allow all-done to succeed for non-PRs.
178+ if : github.event_name != 'pull_request'
179+ run : echo "Nothing to check here."
180+
176181 cfmt :
177182 runs-on : ubuntu-24.04
178183 steps :
You can’t perform that action at this time.
0 commit comments