Skip to content

Commit 23c2c75

Browse files
committed
Add GH actions
1 parent 3e1afe4 commit 23c2c75

19 files changed

+572
-10
lines changed

.github/CODEOWNERS

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Lines starting with '#' are comments.
2+
# Each line is a file pattern followed by one or more owners.
3+
4+
# More details are here: https://help.github.com/articles/about-codeowners/
5+
6+
# The '*' pattern is global owners.
7+
8+
* @IEvangelist

.github/ISSUE_TEMPLATE/config.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: learn.microsoft.com site feedback
4+
url: https://github.com/MicrosoftDocs/feedback/issues/new/choose
5+
about: Log general learn.microsoft.com site issues here
6+
- name: .NET platform and other product feedback
7+
url: https://aka.ms/feedback/report?space=61
8+
about: Log product issues here
9+
- name: .NET Aspire Q&A forums
10+
url: https://learn.microsoft.com/answers/products/dotnet
11+
about: Find answers to your technical questions about .NET
12+
- name: .NET tech community forums
13+
url: https://techcommunity.microsoft.com/t5/net/ct-p/dotnet
14+
about: Discuss .NET with community members
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Learn feedback control.
2+
description: |
3+
⛔ This template is hooked into the feedback control on the bottom of every page on the live site. It automatically fills in several fields for you. Don't use for other purposes. ⛔
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: "## Issue information"
8+
- type: markdown
9+
attributes:
10+
value: Select the issue type, and describe the issue in the text box below. Add as much detail as needed to help us resolve the issue.
11+
- type: dropdown
12+
id: issue-type
13+
attributes:
14+
label: Type of issue
15+
options:
16+
- Typo
17+
- Code doesn't work
18+
- Missing information
19+
- Outdated article
20+
- Other (describe below)
21+
validations:
22+
required: true
23+
- type: textarea
24+
id: feedback
25+
validations:
26+
required: true
27+
attributes:
28+
label: Description
29+
- type: markdown
30+
attributes:
31+
value: "## 🚧 Article information 🚧"
32+
- type: markdown
33+
attributes:
34+
value: "*Don't modify the following fields*. They are automatically filled in for you. Doing so will disconnect your issue from the affected article. *Don't edit them*."
35+
- type: input
36+
id: pageUrl
37+
validations:
38+
required: true
39+
attributes:
40+
label: Page URL
41+
- type: input
42+
id: contentSourceUrl
43+
validations:
44+
required: true
45+
attributes:
46+
label: Content source URL
47+
- type: input
48+
id: documentVersionIndependentId
49+
validations:
50+
required: true
51+
attributes:
52+
label: Document Version Independent Id
53+
- type: input
54+
id: author
55+
validations:
56+
required: true
57+
attributes:
58+
label: Article author

.github/ISSUE_TEMPLATE/doc-issue.md

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
name: ".NET Aspire doc issue"
3+
about: Report a problem in the .NET Aspire documentation
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
---
8+
9+
<!--
10+
**Before you open an issue**
11+
12+
If the issue is:
13+
14+
- A simple typo or similar correction, consider submitting a PR to fix it instead of logging an issue. See [the contributor guide](https://learn.microsoft.com/contribute/#quick-edits-to-documentation) for instructions.
15+
- A general support question, consider asking on a support forum site.
16+
- A site design concern, create an issue at [MicrosoftDocs/feedback](https://github.com/MicrosoftDocs/feedback/issues/new/choose).
17+
- A problem completing a tutorial, compare your code with the completed sample.
18+
- A duplicate of an open or closed issue, leave a comment on that issue.
19+
-->
20+
21+
**Issue description**
22+
23+
<!-- include description here -->
24+
25+
**Target framework**
26+
27+
<!-- Check the .NET target framework(s) being used, and include the version number(s). -->
28+
29+
- [ ] .NET Core
30+
- [ ] .NET Framework
31+
- [ ] .NET Standard
32+
33+
<!--
34+
If using the .NET Core SDK, include `dotnet --info` output. If using .NET Framework without the .NET Core SDK, include info from Visual Studio's **Help** > **About Microsoft Visual Studio** dialog.
35+
-->
36+
37+
<details>
38+
<summary><strong>dotnet --info output</strong> or <strong>About VS info</strong></summary>
39+
40+
```console
41+
<replace>
42+
```
43+
</details>
+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: ".NET Aspire doc request"
3+
about: Request a new article to provide missing information
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
---
8+
9+
**Help us make content visible**
10+
11+
<!--
12+
- Tell us what search terms you used and how you searched docs.
13+
- Tell us what docs you found that didn't address your concern.
14+
-->
15+
16+
**Describe the new article**
17+
18+
<!--
19+
- Explain why this article is needed.
20+
- Suggest a location in the Table of Contents.
21+
- Write an abstract. In one **short** paragraph, describe what this article will cover.
22+
- Create an outline for the new article. We'll help review the outline and approve it before anyone writes the article.
23+
-->
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
name: OKR internal use only template
3+
about: This is the object key result (OKR) template, for internal use only.
4+
title: 'OKR: address x, y, and z'
5+
labels: OKR
6+
assignees: ''
7+
---
8+
9+
<!--
10+
11+
GOAL:
12+
Each team has a commitment around content performance
13+
14+
OBJECTIVES:
15+
16+
- Content developers continue to get familiar with the Content Perf report by identifying and updating articles
17+
- Create a sustainable and repeatable process. Each M1 has a project for content performance and tracks
18+
- Continue to use data and feedback from past quarters to influence updates to formulas and ranking
19+
20+
RESULTS:
21+
22+
- Continue with 1 article per writer, per quarter
23+
- % of page views to higher performing articles increases (targeted at 80% all up)
24+
25+
TRACKING:
26+
27+
- Use the [Azure DevOps template](https://dev.azure.com/mseng/TechnicalContent/_workitems/create/User%20Story) to create a tracking item
28+
- Required:
29+
- [ ] Includes tag "content-perf" and "FY21Q3"
30+
- [ ] Set M1 and M2 fields
31+
- [ ] Area path. Set to your team's path as you see fit
32+
- Writers add "ms.custom: contperfq3" to their updated articles to help with data reporting.
33+
34+
NOTE: For those teams that aren't currently using the [mseng TechnicalContent project](https://dev.azure.com/mseng/TechnicalContent), you'll still need to set up your items in it so we have an accurate inventory and ability to track.
35+
36+
-->

.github/PULL_REQUEST_TEMPLATE.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
## Summary
2+
3+
Describe your changes here.
4+
5+
Fixes #Issue_Number (if available)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: 'OPS status checker'
2+
3+
on:
4+
pull_request_target:
5+
types: [opened, synchronize, reopened]
6+
7+
jobs:
8+
status_checker_job:
9+
name: Look for build warnings
10+
runs-on: ubuntu-latest
11+
permissions:
12+
statuses: write
13+
issues: write
14+
pull-requests: write
15+
steps:
16+
- uses: actions/[email protected]
17+
with:
18+
ref: ${{ github.event.pull_request.head.sha }}
19+
20+
- uses: dotnet/docs-tools/actions/status-checker@main
21+
with:
22+
repo_token: ${{ secrets.GITHUB_TOKEN }}
23+
docs_path: "docs"
24+
url_base_path: "dotnet"

.github/workflows/clean-repo.yml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: "clean repo"
2+
3+
on:
4+
schedule:
5+
- cron: "0 1 1 * *" # Runs at 01:00, on day 1 of the month
6+
workflow_dispatch:
7+
8+
jobs:
9+
clean-repo:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
issues: write
14+
pull-requests: write
15+
16+
steps:
17+
- uses: actions/[email protected]
18+
19+
# Call clean repo
20+
- name: Clean repo
21+
id: clean-repo-step
22+
uses: dotnet/docs-tools/cleanrepo/CleanRepo@main
23+
with:
24+
docfx_directory: '.'
25+
articles_directory: 'docs'
26+
media_directory: 'docs'
27+
snippets_directory: '.' # This includes the ./samples and ./docs directories, which both contain snippets.
28+
includes_directory: 'includes'
29+
url_base_path: '/dotnet'
30+
delete: true
31+
orphaned_articles: true
32+
orphaned_images: true
33+
catalog_images: false
34+
orphaned_snippets: true
35+
orphaned_includes: true
36+
replace_redirects: true
37+
relative_links: true
38+
remove_hops: true
39+
40+
# Create the PR for the work done by the "clean repo" tool
41+
- name: create-pull-request
42+
uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38
43+
with:
44+
branch: create-cleanrepo-pull-request/patch
45+
title: "Monthly chores: Automated repo cleanup"
46+
commit-message: 'Bot 🤖 generated CleanRepo tool run'
47+
body: "Find and delete orphaned articles, images, snippets, and include files. Remove redirection hops, update redirected links in articles, and replace site-relative links with file-relative links. Contributes to #..."
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: dependabot auto-approve and auto-merge
2+
on: pull_request
3+
4+
permissions:
5+
contents: write
6+
pull-requests: write
7+
8+
jobs:
9+
dependabot:
10+
runs-on: ubuntu-latest
11+
if: ${{ github.actor == 'dependabot[bot]' && github.repository_owner == 'dotnet' }}
12+
steps:
13+
- name: Dependabot metadata
14+
id: metadata
15+
uses: dependabot/fetch-metadata@c9c4182bf1b97f5224aee3906fd373f6b61b4526
16+
with:
17+
github-token: "${{ secrets.GITHUB_TOKEN }}"
18+
- name: Approve a PR
19+
run: gh pr review --approve "$PR_URL"
20+
env:
21+
PR_URL: ${{github.event.pull_request.html_url}}
22+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
23+
- name: Enable auto-merge for Dependabot PRs
24+
run: gh pr merge --auto --merge "$PR_URL"
25+
env:
26+
PR_URL: ${{github.event.pull_request.html_url}}
27+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

.github/workflows/dependabot-bot.yml

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# The name used in the GitHub UI for the workflow
2+
name: "update dependabot.yml"
3+
# When to run this action:
4+
# - Scheduled to run at 5 AM every Monday.
5+
# - Manually runnable from the GitHub UI with a reason
6+
on:
7+
schedule:
8+
- cron: "0 5 * * 1" # 5 AM every Monday.
9+
workflow_dispatch:
10+
inputs:
11+
reason:
12+
description: "The reason for running the workflow"
13+
required: true
14+
default: "Manual run"
15+
# Run on the latest version of Ubuntu
16+
jobs:
17+
dependabot-bot:
18+
runs-on: ubuntu-latest
19+
permissions:
20+
contents: write
21+
pull-requests: write
22+
23+
# Checkout the repo into the workspace within the VM
24+
steps:
25+
- uses: actions/[email protected]
26+
# - name: Setup .NET
27+
# uses: actions/setup-dotnet@4d4a70f4a5b2a5a5329f13be4ac933f2c9206ac0
28+
# with:
29+
# dotnet-version: 7.0.x
30+
# dotnet-quality: 'preview'
31+
# If triggered manually, print the reason why
32+
- name: "Print manual run reason"
33+
if: ${{ github.event_name == 'workflow_dispatch' }}
34+
run: |
35+
echo "Reason: ${{ github.event.inputs.reason }}"
36+
# Run the .NET dependabot-bot tool
37+
- name: dependabot-bot
38+
id: dependabot-bot
39+
uses: dotnet/docs-tools/actions/dependabot-bot@main
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
with:
43+
root-directory: "/github/workspace"
44+
dependabot-yml-path: ".github/dependabot.yml"
45+
- name: Create pull request
46+
if: github.event_name == 'workflow_dispatch' || github.repository_owner == 'dotnet'
47+
uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38
48+
with:
49+
branch: create-dependabotconfig-pull-request/patch
50+
title: "Update dependabot.yml - automatically."
51+
body: ".NET dependabot-bot automated PR. 🤖"
52+
commit-message: ".NET dependabot-bot automated PR."

.github/workflows/live-protection.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
on: [pull_request_target]
2+
3+
jobs:
4+
comment:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410
8+
env:
9+
SHOULD_COMMENT: ${{ github.base_ref == 'refs/heads/live' && !(github.event.issue.user.login == 'cxwtool' || github.head_ref == 'refs/heads/main') }}
10+
with:
11+
script: |
12+
if (process.env.SHOULD_COMMENT == 'true') {
13+
github.issues.createComment({
14+
issue_number: context.issue.number,
15+
owner: context.repo.owner,
16+
repo: context.repo.repo,
17+
body: 'It looks like this pull request may have been opened on the `live` branch by mistake. In general, PRs should target the `main` branch.'
18+
})
19+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"problemMatcher": [
3+
{
4+
"owner": "markdownlint",
5+
"pattern": [
6+
{
7+
"regexp": "^([^:]*):(\\d+):?(\\d+)?\\s([\\w-\\/]*)\\s(.*)$",
8+
"file": 1,
9+
"line": 2,
10+
"column": 3,
11+
"code": 4,
12+
"message": 5
13+
}
14+
]
15+
}
16+
]
17+
}

0 commit comments

Comments
 (0)