diff options
| author | Ned Batchelder <ned@nedbatchelder.com> | 2022-06-02 08:37:49 -0400 |
|---|---|---|
| committer | Ned Batchelder <ned@nedbatchelder.com> | 2022-06-02 08:37:49 -0400 |
| commit | 67e5e95c133cf970c0706d2084f7e1c65d1c1b3a (patch) | |
| tree | 085f6ce1e651ca1517abb1234bfb69ead46383f0 /ci | |
| parent | 82169a624678223742d303d3ae520ed08f2e8b72 (diff) | |
| download | python-coveragepy-git-67e5e95c133cf970c0706d2084f7e1c65d1c1b3a.tar.gz | |
build: automate triggering kit builds on github actions
Diffstat (limited to 'ci')
| -rw-r--r-- | ci/trigger_build_kits.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/ci/trigger_build_kits.py b/ci/trigger_build_kits.py new file mode 100644 index 00000000..0485df10 --- /dev/null +++ b/ci/trigger_build_kits.py @@ -0,0 +1,26 @@ +# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 +# For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt + +"""Trigger the GitHub action to build our kits.""" + +import sys + +import requests + +repo_owner = sys.argv[1] + +# The GitHub URL makes no mention of which workflow to use. It's found based on +# the event_type, which matches the types in the workflow: +# +# on: +# repository_dispatch: +# types: +# - build-kits +# + +resp = requests.post( + f"https://api.github.com/repos/{repo_owner}/dispatches", + json={"event_type": "build-kits"}, +) +print(f"Status: {resp.status_code}") +print(resp.text) |
