Skip to content

Commit

Permalink
Repo File Sync: Update to Mu DevOps v6.1.0 (#301)
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
[#6018366795](https://github.com/microsoft/mu_devops/actions/runs/6018366795)

Signed-off-by: Project Mu UEFI Bot <[email protected]>
  • Loading branch information
uefibot authored Aug 30, 2023
1 parent a814bb2 commit 98e18fc
Show file tree
Hide file tree
Showing 11 changed files with 83 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .azurepipelines/MuDevOpsWrapper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ resources:
type: github
endpoint: microsoft
name: microsoft/mu_devops
ref: refs/tags/v6.0.1
ref: refs/tags/v6.1.0

parameters:
- name: do_ci_build
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"image": "ghcr.io/microsoft/mu_devops/ubuntu-22-dev:latest",
"postCreateCommand": "git config --global --add safe.directory '*' && pip install --upgrade -r pip-requirements.txt",
"postCreateCommand": "git config --global --add safe.directory '*' && git config --global --add core.autocrlf false && pip install --upgrade -r pip-requirements.txt",
"customizations": {
"vscode": {
"extensions": [
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/auto-approve.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ jobs:
approval_check:
if: |
github.event.pull_request.user.login == 'dependabot[bot]' || github.event.pull_request.user.login == 'uefibot'
uses: microsoft/mu_devops/.github/workflows/AutoApprover.yml@v6.0.1
uses: microsoft/mu_devops/.github/workflows/AutoApprover.yml@v6.1.0
secrets: inherit
2 changes: 1 addition & 1 deletion .github/workflows/auto-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ jobs:
merge_check:
if: |
github.event.pull_request.user.login == 'dependabot[bot]' || github.event.pull_request.user.login == 'uefibot'
uses: microsoft/mu_devops/.github/workflows/AutoMerger.yml@v6.0.1
uses: microsoft/mu_devops/.github/workflows/AutoMerger.yml@v6.1.0
secrets: inherit
74 changes: 73 additions & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
git config --system core.longpaths true
- name: Install/Upgrade pip Modules
run: pip install -r pip-requirements.txt --upgrade
run: pip install -r pip-requirements.txt --upgrade requests

- name: Determine CI Settings File Supported Operations
id: get_ci_file_operations
Expand Down Expand Up @@ -149,6 +149,78 @@ 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
GITHUB_REPO = "sagiegurari/cargo-make"
API_URL = f"https://api.github.com/repos/{GITHUB_REPO}/releases/latest"
# 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)
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!")
cache_key = f'cargo-make-{latest_cargo_make_version}'
with open(os.environ['GITHUB_OUTPUT'], 'a') as fh:
print(f'cargo_bin_path={os.path.join(os.environ["USERPROFILE"], ".cargo", "bin")}', file=fh)
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@v3
with:
path: ${{ steps.get_cargo_tool_details.outputs.cargo_bin_path }}
key: ${{ steps.get_cargo_tool_details.outputs.cargo_make_cache_key }}

- name: Download cargo-make
if: steps.cargo_make_cache.outputs.cache-hit != 'true'
uses: robinraju/[email protected]
with:
repository: 'sagiegurari/cargo-make'
tag: '${{ steps.get_cargo_tool_details.outputs.cargo_make_version }}'
fileName: 'cargo-make-v${{ steps.get_cargo_tool_details.outputs.cargo_make_version }}-x86_64-pc-windows-msvc.zip'
out-file-path: 'cargo-make-download'
token: ${{ secrets.GITHUB_TOKEN }}

- name: Extract cargo-make
if: steps.cargo_make_cache.outputs.cache-hit != 'true'
env:
CARGO_MAKE_VERSION: ${{ steps.get_cargo_tool_details.outputs.cargo_make_version }}
DEST_DIR: ${{steps.get_cargo_tool_details.outputs.cargo_bin_path }}
shell: python
run: |
import os
import shutil
import zipfile
from pathlib import Path
DOWNLOAD_DIR = Path(os.environ["GITHUB_WORKSPACE"], "cargo-make-download")
ZIP_FILE_NAME = f"cargo-make-v{os.environ['CARGO_MAKE_VERSION']}-x86_64-pc-windows-msvc.zip"
ZIP_FILE_PATH = Path(DOWNLOAD_DIR, ZIP_FILE_NAME)
EXTRACT_DIR = Path(DOWNLOAD_DIR, "cargo-make-contents")
with zipfile.ZipFile(ZIP_FILE_PATH, 'r') as zip_ref:
zip_ref.extractall(EXTRACT_DIR)
for extracted_file in EXTRACT_DIR.iterdir():
if extracted_file.name == "cargo-make.exe":
shutil.copy2(extracted_file, os.environ["DEST_DIR"])
break
- name: Rust Prep
run: rustup component add rust-src

- name: Setup
if: steps.get_ci_file_operations.outputs.setup_supported == 'true'
run: stuart_setup -c .pytool/CISettings.py -t DEBUG -a ${{ matrix.archs }} TOOL_CHAIN_TAG=${{ matrix.tool_chain_tag }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/issue-assignment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ on:

jobs:
apply:
uses: microsoft/mu_devops/.github/workflows/IssueAssignment.yml@v6.0.1
uses: microsoft/mu_devops/.github/workflows/IssueAssignment.yml@v6.1.0
2 changes: 1 addition & 1 deletion .github/workflows/label-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ on:

jobs:
apply:
uses: microsoft/mu_devops/.github/workflows/Labeler.yml@v6.0.1
uses: microsoft/mu_devops/.github/workflows/Labeler.yml@v6.1.0
2 changes: 1 addition & 1 deletion .github/workflows/label-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ on:

jobs:
sync:
uses: microsoft/mu_devops/.github/workflows/LabelSyncer.yml@v6.0.1
uses: microsoft/mu_devops/.github/workflows/LabelSyncer.yml@v6.1.0
2 changes: 1 addition & 1 deletion .github/workflows/release-draft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ on:

jobs:
draft:
uses: microsoft/mu_devops/.github/workflows/ReleaseDrafter.yml@v6.0.1
uses: microsoft/mu_devops/.github/workflows/ReleaseDrafter.yml@v6.1.0
secrets: inherit
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ on:

jobs:
check:
uses: microsoft/mu_devops/.github/workflows/Stale.yml@v6.0.1
uses: microsoft/mu_devops/.github/workflows/Stale.yml@v6.1.0
2 changes: 1 addition & 1 deletion .github/workflows/triage-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ on:

jobs:
triage:
uses: microsoft/mu_devops/.github/workflows/IssueTriager.yml@v6.0.1
uses: microsoft/mu_devops/.github/workflows/IssueTriager.yml@v6.1.0

0 comments on commit 98e18fc

Please sign in to comment.