File tree 1 file changed +24
-5
lines changed
1 file changed +24
-5
lines changed Original file line number Diff line number Diff line change 1
1
name : CI
2
2
on :
3
- push : {}
4
- pull_request : {}
3
+ pull_request :
4
+ merge_group :
5
5
6
6
env :
7
7
AWS_ACCESS_KEY_ID : AKIA46X5W6CZEAQSMRH7
30
30
- name : Check formatting
31
31
run : cargo fmt --all --check
32
32
33
- ci :
34
- name : CI
33
+ deploy :
34
+ name : Deploy
35
35
runs-on : ubuntu-latest
36
+ if : github.event_name == 'merge_group'
36
37
steps :
37
38
- name : Checkout the source code
38
39
uses : actions/checkout@v4
50
51
redeploy_ecs_service : triagebot
51
52
aws_access_key_id : " ${{ env.AWS_ACCESS_KEY_ID }}"
52
53
aws_secret_access_key : " ${{ secrets.AWS_SECRET_ACCESS_KEY }}"
53
- if : github.ref == 'refs/heads/master'
54
+
55
+ # Summary job for the merge queue.
56
+ # ALL THE PREVIOUS JOBS NEED TO BE ADDED TO THE `needs` SECTION OF THIS JOB!
57
+ ci :
58
+ needs : [ test, deploy ]
59
+ # We need to ensure this job does *not* get skipped if its dependencies fail,
60
+ # because a skipped job is considered a success by GitHub. So we have to
61
+ # overwrite `if:`. We use `!cancelled()` to ensure the job does still not get run
62
+ # when the workflow is canceled manually.
63
+ if : ${{ !cancelled() }}
64
+ runs-on : ubuntu-latest
65
+ steps :
66
+ # Manually check the status of all dependencies. `if: failure()` does not work.
67
+ - name : Conclusion
68
+ run : |
69
+ # Print the dependent jobs to see them in the CI log
70
+ jq -C <<< '${{ toJson(needs) }}'
71
+ # Check if all jobs that we depend on (in the needs array) were successful.
72
+ jq --exit-status 'all(.result == "success" or .result == "skipped")' <<< '${{ toJson(needs) }}'
You can’t perform that action at this time.
0 commit comments