Skip to content

Commit c83151f

Browse files
authored
Merge pull request #818 from Kobzol/ci-merge-queue
Configure CI for merge queue
2 parents ab710e0 + efb8d0f commit c83151f

File tree

1 file changed

+10
-23
lines changed

1 file changed

+10
-23
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
name: CI
22
on:
3-
push:
4-
branches:
5-
- master
6-
- auto
7-
- try
3+
merge_group:
84
pull_request:
9-
branches:
10-
- "**"
115

126
jobs:
137
test:
@@ -111,22 +105,15 @@ jobs:
111105
- name: Build Chalk book
112106
run: cd book && ./mdbook build
113107

114-
end-success:
115-
name: bors build finished
116-
if: success()
117-
runs-on: ubuntu-latest
108+
conclusion:
118109
needs: [test, fmt]
119-
120-
steps:
121-
- name: Mark the job as successful
122-
run: exit 0
123-
124-
end-failure:
125-
name: bors build finished
126-
if: "!success()"
110+
# !cancelled() executes the job regardless of whether the previous jobs passed, failed or get skipped.
111+
if: ${{ !cancelled() }}
127112
runs-on: ubuntu-latest
128-
needs: [test, fmt]
129-
130113
steps:
131-
- name: Mark the job as a failure
132-
run: exit 1
114+
- name: Conclusion
115+
run: |
116+
# Print the dependent jobs to see them in the CI log
117+
jq -C <<< '${{ toJson(needs) }}'
118+
# Check if all jobs that we depend on (in the needs array) were successful.
119+
jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'

0 commit comments

Comments
 (0)