Skip to content

Commit ccb4bb1

Browse files
committed
[CI] As soon as a PR is created or updated, create pending (yellow) commit statuses for all Buildbot jobs
1 parent cb30aa7 commit ccb4bb1

File tree

1 file changed

+85
-0
lines changed

1 file changed

+85
-0
lines changed

.github/workflows/pending.yml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# This is just a short-term solution until we have migrated all of CI to Buildkite.
2+
#
3+
# TODO: delete this file once we have migrated all of CI to Buildkite.
4+
#
5+
# TODO: disable GitHub Actions on the `JuliaLang/julia` repository once we have migrated all
6+
# of CI to Buildkite.
7+
8+
name: Pending
9+
10+
on:
11+
push:
12+
branches:
13+
- 'master'
14+
- 'release-*'
15+
pull_request:
16+
branches:
17+
- 'master'
18+
- 'release-*'
19+
20+
permissions:
21+
statuses: write
22+
actions: none
23+
checks: none
24+
contents: none
25+
deployments: none
26+
issues: none
27+
discussions: none
28+
packages: none
29+
pull-requests: none
30+
repository-projects: none
31+
security-events: none
32+
33+
jobs:
34+
pending:
35+
name: pending
36+
runs-on: ubuntu-latest
37+
strategy:
38+
fail-fast: false
39+
steps:
40+
- run: echo "SHA=${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV
41+
if: github.event_name == 'pull_request'
42+
43+
- run: echo "SHA=${{ env.GITHUB_SHA }}" >> $GITHUB_ENV
44+
if: github.event_name != 'pull_request'
45+
46+
- run: echo "The SHA is ${{ env.SHA }}"
47+
48+
- run: |
49+
declare -a context_list=(
50+
"buildbot/package_freebsd64"
51+
"buildbot/package_linux32"
52+
"buildbot/package_linux64"
53+
"buildbot/package_linuxaarch64"
54+
"buildbot/package_linuxarmv7l"
55+
"buildbot/package_linuxppc64le"
56+
"buildbot/package_macos64"
57+
"buildbot/package_macosaarch64"
58+
"buildbot/package_musl64"
59+
"buildbot/package_win32"
60+
"buildbot/package_win64"
61+
"buildbot/tester_freebsd64"
62+
"buildbot/tester_linux32"
63+
"buildbot/tester_linux64"
64+
"buildbot/tester_linuxaarch64"
65+
"buildbot/tester_linuxarmv7l"
66+
"buildbot/tester_linuxppc64le"
67+
"buildbot/tester_macos64"
68+
"buildbot/tester_macosaarch64"
69+
"buildbot/tester_musl64"
70+
"buildbot/tester_win32"
71+
"buildbot/tester_win64"
72+
)
73+
for context in "${context_list[@]}"
74+
do
75+
curl \
76+
-X POST \
77+
-H "Authorization: token $GITHUB_TOKEN" \
78+
-H "Accept: application/vnd.github.v3+json" \
79+
-d "{\"state\": \"$STATE\", \"context\": \"$context\"}" \
80+
https://api.github.com/repos/JuliaLang/julia/statuses/$SHA
81+
done
82+
env:
83+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
84+
SHA: ${{ env.SHA }}
85+
STATE: "pending"

0 commit comments

Comments
 (0)