mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-01-30 18:13:32 +00:00
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
This commit is contained in:
parent
2fe93ab2d7
commit
6fbc35f473
4
.github/matrix.py
vendored
4
.github/matrix.py
vendored
@ -26,7 +26,9 @@ def clean_ssl(ssl):
|
|||||||
return ssl.replace("_VERSION", "").lower()
|
return ssl.replace("_VERSION", "").lower()
|
||||||
|
|
||||||
def determine_latest_openssl(ssl):
|
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'))
|
tags = json.loads(openssl_tags.read().decode('utf-8'))
|
||||||
latest_tag = ''
|
latest_tag = ''
|
||||||
for tag in tags:
|
for tag in tags:
|
||||||
|
Loading…
Reference in New Issue
Block a user