Skip to content

Commit 71a9df7

Browse files
authored
Merge pull request #112424 from dotnet/merge/release/9.0-to-release/9.0-staging
[automated] Merge branch 'release/9.0' => 'release/9.0-staging'
2 parents 10a6130 + c97d3a4 commit 71a9df7

File tree

5 files changed

+32
-8
lines changed

5 files changed

+32
-8
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,3 +113,4 @@
113113
/docs/area-owners.* @jeffhandley
114114
/docs/issue*.md @jeffhandley
115115
/.github/policies/ @jeffhandley @mkArtakMSFT
116+
/.github/workflows/ @jeffhandley @dotnet/runtime-infrastructure

.github/workflows/README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Workflows
2+
3+
General guidance:
4+
5+
Please make sure to include the @dotnet/runtime-infrastructure group as a reviewer of your PRs.
6+
7+
For workflows that are triggered by pull requests, refer to GitHub's documentation for the `pull_request` and `pull_request_target` events. The `pull_request_target` event is the more common use case in this repository as it runs the workflow in the context of the target branch instead of in the context of the pull request's fork or branch. However, workflows that need to consume the contents of the pull request need to use the `pull_request` event. There are security considerations with each of the events though.
8+
9+
Most workflows are intended to run only in the `dotnet/runtime` repository and not in forks. To force workflow jobs to be skipped in forks, each job should apply an `if` statement that checks the repository name or owner. Either approach works, but checking only the repository owner allows the workflow to run in copies or forks withing the dotnet org.
10+
11+
```yaml
12+
jobs:
13+
job-1:
14+
# Do not run this job in forks
15+
if: github.repository == 'dotnet/runtime'
16+
17+
job-2:
18+
# Do not run this job in forks outside the dotnet org
19+
if: github.repository_owner == 'dotnet'
20+
```
21+
22+
Refer to GitHub's [Workflows in forked repositories](https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#workflows-in-forked-repositories) and [pull_request_target](https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#pull_request_target) documentation for more information.

.github/workflows/check-no-merge-label.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ permissions:
44
pull-requests: read
55

66
on:
7-
pull_request:
8-
types: [opened, edited, reopened, labeled, unlabeled, synchronize]
7+
pull_request_target:
8+
types: [opened, reopened, labeled, unlabeled]
99
branches:
10-
- 'main'
1110
- 'release/**'
1211

1312
jobs:
1413
check-labels:
14+
if: github.repository == 'dotnet/runtime'
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: Check 'NO-MERGE' label

.github/workflows/check-service-labels.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@ permissions:
44
pull-requests: read
55

66
on:
7-
pull_request:
8-
types: [opened, edited, reopened, labeled, unlabeled, synchronize]
7+
pull_request_target:
8+
types: [opened, reopened, labeled, unlabeled]
99
branches:
1010
- 'release/**'
1111

1212
jobs:
1313
check-labels:
14+
if: github.repository == 'dotnet/runtime'
1415
runs-on: ubuntu-latest
1516
steps:
1617
- name: Check 'Servicing-approved' label

eng/pipelines/runtime-official.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ extends:
4141
# Localization build
4242
#
4343

44-
- ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/release/9.0') }}:
44+
- ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/main') }}:
4545
- template: /eng/common/templates-official/job/onelocbuild.yml
4646
parameters:
4747
MirrorRepo: runtime
48-
MirrorBranch: release/9.0
48+
MirrorBranch: main
4949
LclSource: lclFilesfromPackage
5050
LclPackageId: 'LCL-JUNO-PROD-RUNTIME'
5151

@@ -661,7 +661,7 @@ extends:
661661
flattenFolders: true
662662

663663
buildArgs: -s mono.workloads -c $(_BuildConfig) /p:PackageSource=$(Build.SourcesDirectory)/artifacts/workloadPackages /p:WorkloadOutputPath=$(Build.SourcesDirectory)/artifacts/workloads
664-
664+
665665
postBuildSteps:
666666
# Upload packages wrapping msis
667667
- template: /eng/pipelines/common/upload-intermediate-artifacts-step.yml

0 commit comments

Comments
 (0)