diff --git a/script/ci/src/Main.scala b/script/ci/src/Main.scala index 40b52f318..3760474e3 100644 --- a/script/ci/src/Main.scala +++ b/script/ci/src/Main.scala @@ -214,9 +214,17 @@ object Main: def findCurrentJobURL() = val runID = sys.env("GITHUB_RUN_ID") val jobName = sys.env("GITHUB_JOB_NAME") - Logger.info(s"Getting URL for Run ID: ${runID}, job '${jobName}'") + val proxy: (String, Int) = sys.env.get("https_proxy") + .map(proxy => new java.net.URI(proxy)) + .map(uri => (uri.getHost, uri.getPort)) + .getOrElse(null) - val response = requests.get.stream(s"https://api.github.com/repos/chipsalliance/t1/actions/runs/${runID}/jobs") + Logger.info(s"Getting URL for Run ID: ${runID}, job '${jobName}'") + val session = requests.Session( + headers = Map("User-Agent" -> "Mozilla/5.0 (X11; Linux x86_64; rv:134.0) Gecko/20100101 Firefox/134.0"), + proxy = proxy, + ) + val response = session.get.stream(s"https://api.github.com/repos/chipsalliance/t1/actions/runs/${runID}/jobs") val ciData = ujson.read(response) ciData .obj("jobs")