summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorIlya Shipitsin <chipitsine@gmail.com>2022-12-22 22:27:37 +0600
committerWilliam Lallemand <wlallemand@haproxy.org>2022-12-22 17:36:32 +0100
commit6fbc35f4739040a0da6150e27a2b6e7e41bf4045 (patch)
treeb0e5204041a5919f2ebeccc3691ac19f671a9f9a /.github
parent2fe93ab2d74bb242c4aec07436dedb288bfbb961 (diff)
downloadhaproxy-6fbc35f4739040a0da6150e27a2b6e7e41bf4045.tar.gz
CI: github: enable github api authentication for OpenSSL tags read
github api throttles requests with no auth, thus we can enable GITHUB_API_TOKEN env variable. if not set, current behaviour is kept
Diffstat (limited to '.github')
-rwxr-xr-x.github/matrix.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/.github/matrix.py b/.github/matrix.py
index ffc3414b9..72e6b1a85 100755
--- a/.github/matrix.py
+++ b/.github/matrix.py
@@ -26,7 +26,9 @@ def clean_ssl(ssl):
return ssl.replace("_VERSION", "").lower()
def determine_latest_openssl(ssl):
- openssl_tags = urllib.request.urlopen("https://api.github.com/repos/openssl/openssl/tags")
+ headers = {'Authorization': 'token ' + environ.get('GITHUB_API_TOKEN')} if environ.get('GITHUB_API_TOKEN') else {}
+ request = urllib.request.Request('https://api.github.com/repos/openssl/openssl/tags', headers=headers)
+ openssl_tags = urllib.request.urlopen(request)
tags = json.loads(openssl_tags.read().decode('utf-8'))
latest_tag = ''
for tag in tags: