Skip to content

Commit

Permalink
Repo File Sync: synced file(s) with microsoft/mu_devops
Browse files Browse the repository at this point in the history
Signed-off-by: Project Mu UEFI Bot <[email protected]>
  • Loading branch information
uefibot committed Feb 25, 2024
1 parent cfc6138 commit fbffbf7
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: BSD-2-Clause-Patent


name: "CodeQL"

on:
Expand Down Expand Up @@ -151,25 +152,34 @@ jobs:
print(f'ci_setup_supported={str(ci_setup_supported).lower()}', file=fh)
print(f'setup_supported={str(setup_supported).lower()}', file=fh)
- name: Get Cargo Tool Details
id: get_cargo_tool_details
shell: python
run: |
import os
import requests
import sys
GITHUB_REPO = "sagiegurari/cargo-make"
API_URL = f"https://api.github.com/repos/{GITHUB_REPO}/releases/latest"
api_url = f"https://api.github.com/repos/{GITHUB_REPO}/releases/tags/0.37.9"
response = requests.get(api_url)
if response.status_code == 200:
build_release_id = response.json()["id"]
else:
print("::error title=GitHub Release Error!::Failed to get cargo-make release ID!")
sys.exit(1)
# Default value in case getting latest fails, cache will fall
# back on this version.
latest_cargo_make_version = "0.36.13"
response = requests.get(API_URL)
api_url = f"https://api.github.com/repos/{GITHUB_REPO}/releases/{build_release_id}"
response = requests.get(api_url)
if response.status_code == 200:
latest_cargo_make_version = response.json()["tag_name"]
else:
print("::error title=GitHub Release Error!::Failed to get latest cargo-make version!")
print("::error title=GitHub Release Error!::Failed to get cargo-make!")
sys.exit(1)
cache_key = f'cargo-make-{latest_cargo_make_version}'
Expand All @@ -178,6 +188,7 @@ jobs:
print(f'cargo_make_cache_key={cache_key}', file=fh)
print(f'cargo_make_version={latest_cargo_make_version}', file=fh)
- name: Attempt to Load cargo-make From Cache
id: cargo_make_cache
uses: actions/cache@v4
Expand Down Expand Up @@ -453,3 +464,5 @@ jobs:
# Optional category for the results. Used to differentiate multiple results for one commit.
# Each package is a separate category.
category: ${{ matrix.package }}


0 comments on commit fbffbf7

Please sign in to comment.