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 10
10
- main
11
11
- release-*
12
12
pull_request :
13
+ workflow_dispatch :
13
14
permissions :
14
15
contents : read
15
16
@@ -32,12 +33,12 @@ jobs:
32
33
# Disable most of criu-dev jobs, as they are expensive
33
34
# (need to compile criu) and don't add much value/coverage.
34
35
- criu : criu-dev
35
- go-version : 1.22 .x
36
+ go-version : 1.23 .x
36
37
- criu : criu-dev
37
38
rootless : rootless
38
39
- criu : criu-dev
39
40
race : -race
40
- - go-version : 1.22 .x
41
+ - go-version : 1.23 .x
41
42
os : actuated-arm64-6cpu-8gb
42
43
- race : " -race"
43
44
os : actuated-arm64-6cpu-8gb
Original file line number Diff line number Diff line change 7
7
- main
8
8
- release-*
9
9
pull_request :
10
+ workflow_dispatch :
10
11
env :
11
12
GO_VERSION : 1.24
12
13
permissions :
@@ -157,22 +158,26 @@ jobs:
157
158
contents : read
158
159
pull-requests : read
159
160
runs-on : ubuntu-24.04
160
- # Only check commits on pull requests.
161
- if : github.event_name == 'pull_request'
162
161
steps :
163
162
- name : get pr commits
163
+ if : github.event_name == 'pull_request' # Only check commits on pull requests.
164
164
id : ' get-pr-commits'
165
165
uses :
tim-actions/[email protected]
166
166
with :
167
167
token : ${{ secrets.GITHUB_TOKEN }}
168
168
169
169
- name : check subject line length
170
+ if : github.event_name == 'pull_request' # Only check commits on pull requests.
170
171
uses :
tim-actions/[email protected]
171
172
with :
172
173
commits : ${{ steps.get-pr-commits.outputs.commits }}
173
174
pattern : ' ^.{0,72}(\n.*)*$'
174
175
error : ' Subject too long (max 72)'
175
176
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
+
176
181
cfmt :
177
182
runs-on : ubuntu-24.04
178
183
steps :
You can’t perform that action at this time.
0 commit comments