Skip to content

Commit b3cabe8

Browse files
committed
.sync: Fix Mu DevOps version in Mu workflows
Project Mu repos have "leaf" workflows. These are workflow files that wrap around reusable workflows in mu_devops. Currently, a leaf workflow uses the reusable workflow from the latest commit in `mu_devops/main`. This means the version of mu_devops is "floating" in that the leaf workflows immediately pick up the latest change. To improve build traceability and stability, this change moves the "leaf" workflow files to use fixed/release versions of content in the mu_devops repo. This change updates all leaf workflow files to use the version specified in one place - `.sync/Version.njk`. That version will be substituted in the leaf workflow file during the file sync process to downstream repos. Example flow: 1. Make a new Mu DevOps release (e.g. "v1.0.0") 2. Update `.sync/Version.njk` to set `mu_devops` to `"v1.0.0"` Step (2) causes the following automated actions to take place after the change is merged into `mu_devops/main`: 1. All sync files (e.g. a leaf workflow file) that depend on this version get the new value substituted 2. All sync files with the substituted value are synced to their respective repos (PRs created with the change) 3. After the PRs in those repos are merged, they use the new version of Mu DevOps in their pipelines Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
1 parent 492de74 commit b3cabe8

4 files changed

Lines changed: 13 additions & 3 deletions

File tree

.sync/Files.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ group:
274274
- files:
275275
- source: .sync/workflows/leaf/label-issues.yml
276276
dest: .github/workflows/label-issues.yml
277+
template: true
277278
- source: .sync/workflows/config/label-issues/file-paths.yml
278279
dest: .github/workflows/label-issues/file-paths.yml
279280
- source: .sync/workflows/config/label-issues/regex-pull-requests.yml
@@ -298,6 +299,7 @@ group:
298299
- files:
299300
- source: .sync/workflows/leaf/label-sync.yml
300301
dest: .github/workflows/label-sync.yml
302+
template: true
301303
repos: |
302304
microsoft/mu
303305
microsoft/mu_basecore
@@ -319,6 +321,7 @@ group:
319321
- files:
320322
- source: .sync/workflows/leaf/stale.yml
321323
dest: .github/workflows/stale.yml
324+
template: true
322325
repos: |
323326
microsoft/mu
324327
microsoft/mu_basecore
@@ -341,6 +344,7 @@ group:
341344
- files:
342345
- source: .sync/workflows/leaf/stale.yml
343346
dest: .github/workflows/stale-leaf.yml
347+
template: true
344348
repos: |
345349
microsoft/mu_devops
346350

.sync/workflows/leaf/label-issues.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
# SPDX-License-Identifier: BSD-2-Clause-Patent
1515
#
1616

17+
{% import '../../Version.njk' as sync_version -%}
18+
1719
name: Apply Issue and PR Labels
1820

1921
on:
@@ -31,4 +33,4 @@ on:
3133

3234
jobs:
3335
apply:
34-
uses: microsoft/mu_devops/.github/workflows/Labeler.yml@main
36+
uses: microsoft/mu_devops/.github/workflows/Labeler.yml@{{ sync_version.mu_devops }}

.sync/workflows/leaf/label-sync.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
# SPDX-License-Identifier: BSD-2-Clause-Patent
1414
#
1515

16+
{% import '../../Version.njk' as sync_version -%}
17+
1618
name: Sync GitHub Labels
1719

1820
on:
@@ -24,4 +26,4 @@ on:
2426

2527
jobs:
2628
sync:
27-
uses: microsoft/mu_devops/.github/workflows/LabelSyncer.yml@main
29+
uses: microsoft/mu_devops/.github/workflows/LabelSyncer.yml@{{ sync_version.mu_devops }}

.sync/workflows/leaf/stale.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
# For more information, see:
1414
# https://github.com/actions/stale
1515

16+
{% import '../../Version.njk' as sync_version -%}
17+
1618
name: Check for Stale Issues and Pull Requests
1719

1820
on:
@@ -24,4 +26,4 @@ on:
2426

2527
jobs:
2628
check:
27-
uses: microsoft/mu_devops/.github/workflows/Stale.yml@main
29+
uses: microsoft/mu_devops/.github/workflows/Stale.yml@{{ sync_version.mu_devops }}

0 commit comments

Comments
 (0)