Skip to content

Commit

Permalink
Repo File Sync: synced file(s) with microsoft/mu_devops (#42)
Browse files Browse the repository at this point in the history
synced local file(s) with
[microsoft/mu_devops](https://github.com/microsoft/mu_devops).

🤖: View the [Repo File Sync Configuration
File](https://github.com/microsoft/mu_devops/blob/main/.sync/Files.yml)
to see how files are synced.



---

This PR was created automatically by the
[repo-file-sync-action](https://github.com/BetaHuhn/repo-file-sync-action)
workflow run
[#9693751051](https://github.com/microsoft/mu_devops/actions/runs/9693751051)

Signed-off-by: Project Mu UEFI Bot <uefibot@microsoft.com>
  • Loading branch information
uefibot authored Jun 27, 2024
1 parent 97c6c4c commit 0318b1b
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,21 @@ jobs:
import os
import requests
import sys
import time
def get_response_with_retries(url, retries=5, wait_time=10):
for attempt in range(retries):
response = requests.get(url)
if response.status_code == 200:
return response
print(f"::warning title=GitHub API Access Error!::Attempt {attempt + 1} failed. Retrying in {wait_time} seconds...")
time.sleep(wait_time)
return response
GITHUB_REPO = "sagiegurari/cargo-make"
api_url = f"https://api.github.com/repos/{GITHUB_REPO}/releases/tags/0.37.9"
response = requests.get(api_url)
response = get_response_with_retries(api_url)
if response.status_code == 200:
build_release_id = response.json()["id"]
else:
Expand All @@ -174,7 +184,7 @@ jobs:
api_url = f"https://api.github.com/repos/{GITHUB_REPO}/releases/{build_release_id}"
response = requests.get(api_url)
response = get_response_with_retries(api_url)
if response.status_code == 200:
latest_cargo_make_version = response.json()["tag_name"]
else:
Expand Down

0 comments on commit 0318b1b

Please sign in to comment.