auto_deploy: use HTTP to avoid SSL on NAS
This commit is contained in:
+3
-1
@@ -31,7 +31,9 @@ logger = logging.getLogger('auto_deploy')
|
||||
def get_remote_head(repo_url, branch):
|
||||
"""Fetch the latest commit hash from Gitea API."""
|
||||
# repo_url like: https://www.1415243231.top:8418/panda/daily_publish
|
||||
api_url = f"{repo_url}/raw/commit/{branch}"
|
||||
# Use HTTP to avoid SSL issues on NAS
|
||||
http_url = repo_url.replace('https://', 'http://')
|
||||
api_url = f"{http_url}/raw/commit/{branch}"
|
||||
try:
|
||||
req = urllib.request.Request(api_url, headers={'User-Agent': 'auto-deploy'})
|
||||
with urllib.request.urlopen(req, timeout=10) as resp:
|
||||
|
||||
Reference in New Issue
Block a user