Repo File Sync: Update to Mu DevOps v6.1.0 (#187)

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 <uefibot@microsoft.com>
This commit is contained in:
Project Mu UEFI Bot [bot] 2023-08-29 21:06:42 -04:00 коммит произвёл GitHub
Родитель 2fa4327bbc
Коммит 9ad5692639
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
11 изменённых файлов: 107 добавлений и 12 удалений

Просмотреть файл

@ -17,7 +17,7 @@ resources:
type: github
endpoint: microsoft
name: microsoft/mu_devops
ref: refs/tags/v5.0.6
ref: refs/tags/v6.1.0
parameters:
- name: do_ci_build
@ -67,11 +67,19 @@ parameters:
displayName: Extra Jobs to be run after build
type: jobList
default: []
- name: rust_build
displayName: Whether Rust code is being built
type: boolean
default: false
jobs:
- template: Jobs/PrGate.yml@mu_devops
parameters:
linux_container_image: ghcr.io/microsoft/mu_devops/ubuntu-22-build:3bf70b5
linux_container_image: ghcr.io/microsoft/mu_devops/ubuntu-22-build:9ab29bc
${{ if eq(parameters.rust_build, true) }}:
linux_container_options: --security-opt seccomp=unconfined
extra_steps:
- template: Steps/RustSetupSteps.yml@mu_devops
do_ci_build: ${{ parameters.do_ci_build }}
do_ci_setup: ${{ parameters.do_ci_setup }}
do_pr_eval: ${{ parameters.do_pr_eval }}
@ -85,5 +93,20 @@ jobs:
vm_image: $(vm_image)
container_build: ${{ parameters.container_build }}
- ${{ if eq(parameters.rust_build, true) }}:
- job: CargoCmds
displayName: Workspace Cargo Commands
container:
image: ghcr.io/microsoft/mu_devops/ubuntu-22-build:9ab29bc
options: --user root --name mu_devops_build_container --security-opt seccomp=unconfined
steps:
- checkout: self
fetchDepth: 1
clean: true
- template: Steps/RustCargoSteps.yml@mu_devops
- ${{ parameters.extra_jobs }}

Просмотреть файл

@ -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": [

2
.github/workflows/auto-approve.yml поставляемый
Просмотреть файл

@ -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@v5.0.6
uses: microsoft/mu_devops/.github/workflows/AutoApprover.yml@v6.1.0
secrets: inherit

2
.github/workflows/auto-merge.yml поставляемый
Просмотреть файл

@ -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@v5.0.6
uses: microsoft/mu_devops/.github/workflows/AutoMerger.yml@v6.1.0
secrets: inherit

74
.github/workflows/codeql.yml поставляемый
Просмотреть файл

@ -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
@ -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/release-downloader@v1.8
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 }}

2
.github/workflows/issue-assignment.yml поставляемый
Просмотреть файл

@ -18,4 +18,4 @@ on:
jobs:
apply:
uses: microsoft/mu_devops/.github/workflows/IssueAssignment.yml@v5.0.6
uses: microsoft/mu_devops/.github/workflows/IssueAssignment.yml@v6.1.0

2
.github/workflows/label-issues.yml поставляемый
Просмотреть файл

@ -31,4 +31,4 @@ on:
jobs:
apply:
uses: microsoft/mu_devops/.github/workflows/Labeler.yml@v5.0.6
uses: microsoft/mu_devops/.github/workflows/Labeler.yml@v6.1.0

2
.github/workflows/label-sync.yml поставляемый
Просмотреть файл

@ -24,4 +24,4 @@ on:
jobs:
sync:
uses: microsoft/mu_devops/.github/workflows/LabelSyncer.yml@v5.0.6
uses: microsoft/mu_devops/.github/workflows/LabelSyncer.yml@v6.1.0

2
.github/workflows/release-draft.yml поставляемый
Просмотреть файл

@ -27,5 +27,5 @@ on:
jobs:
draft:
uses: microsoft/mu_devops/.github/workflows/ReleaseDrafter.yml@v5.0.6
uses: microsoft/mu_devops/.github/workflows/ReleaseDrafter.yml@v6.1.0
secrets: inherit

2
.github/workflows/stale.yml поставляемый
Просмотреть файл

@ -24,4 +24,4 @@ on:
jobs:
check:
uses: microsoft/mu_devops/.github/workflows/Stale.yml@v5.0.6
uses: microsoft/mu_devops/.github/workflows/Stale.yml@v6.1.0

2
.github/workflows/triage-issues.yml поставляемый
Просмотреть файл

@ -19,4 +19,4 @@ on:
jobs:
triage:
uses: microsoft/mu_devops/.github/workflows/IssueTriager.yml@v5.0.6
uses: microsoft/mu_devops/.github/workflows/IssueTriager.yml@v6.1.0