Skip to content

Commit

Permalink
Merge pull request #41822 from dotnet/main
Browse files Browse the repository at this point in the history
Merge main into live
  • Loading branch information
dotnet-policy-service[bot] authored Jul 18, 2024
2 parents 531ffcf + 2d7b0fe commit a0f8b24
Show file tree
Hide file tree
Showing 53 changed files with 6,107 additions and 114 deletions.
5,730 changes: 5,730 additions & 0 deletions .github/dependabot.yml

Large diffs are not rendered by default.

12 changes: 10 additions & 2 deletions .github/workflows/check-for-build-warnings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
pull_request_target:
types: [opened, synchronize, reopened]

permissions:
contents: read

jobs:
status_checker_job:
name: Look for build warnings
Expand All @@ -13,11 +16,16 @@ jobs:
issues: write
pull-requests: write
steps:
- uses: actions/[email protected]
- name: Harden Runner
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
with:
egress-policy: audit

- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
ref: ${{ github.event.pull_request.head.sha }}

- uses: dotnet/docs-tools/actions/status-checker@main
- uses: dotnet/docs-tools/actions/status-checker@5e8bcc78465d45a7544bba56509a1a69922b6a5a # main
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
docs_path: "docs"
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/clean-repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
- cron: "0 1 1 * *" # Runs at 01:00, on day 1 of the month
workflow_dispatch:

permissions:
contents: read

jobs:
clean-repo:
runs-on: ubuntu-latest
Expand All @@ -14,12 +17,17 @@ jobs:
pull-requests: write

steps:
- uses: actions/[email protected]
- name: Harden Runner
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
with:
egress-policy: audit

- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

# Call clean repo
- name: Clean repo
id: clean-repo-step
uses: dotnet/docs-tools/cleanrepo/CleanRepo@main
uses: dotnet/docs-tools/cleanrepo/CleanRepo@5e8bcc78465d45a7544bba56509a1a69922b6a5a # main
with:
docfx_directory: '.'
articles_directory: 'docs'
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/dependabot-approve-and-automerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' && github.repository_owner == 'dotnet' }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
with:
egress-policy: audit

- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@dbb049abf0d677abbd7f7eee0375145b417fdd34
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/dependabot-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ on:
required: true
default: "Manual run"
# Run on the latest version of Ubuntu
permissions:
contents: read

jobs:
dependabot-bot:
runs-on: ubuntu-latest
Expand All @@ -22,7 +25,12 @@ jobs:

# Checkout the repo into the workspace within the VM
steps:
- uses: actions/[email protected]
- name: Harden Runner
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
with:
egress-policy: audit

- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
# - name: Setup .NET
# uses: actions/setup-dotnet@4d4a70f4a5b2a5a5329f13be4ac933f2c9206ac0
# with:
Expand All @@ -36,7 +44,7 @@ jobs:
# Run the .NET dependabot-bot tool
- name: dependabot-bot
id: dependabot-bot
uses: dotnet/docs-tools/actions/dependabot-bot@main
uses: dotnet/docs-tools/actions/dependabot-bot@5e8bcc78465d45a7544bba56509a1a69922b6a5a # main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Dependency Review Action
#
# This Action will scan dependency manifest files that change as part of a Pull Request,
# surfacing known-vulnerable versions of the packages declared or updated in the PR.
# Once installed, if the workflow run is marked as required,
# PRs introducing known-vulnerable packages will be blocked from merging.
#
# Source repository: https://github.com/actions/dependency-review-action
name: 'Dependency Review'
on: [pull_request]

permissions:
contents: read

jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
with:
egress-policy: audit

- name: 'Checkout Repository'
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: 'Dependency Review'
uses: actions/dependency-review-action@5a2ce3f5b92ee19cbb1541a4984c76d921601d7c # v4.3.4
8 changes: 8 additions & 0 deletions .github/workflows/do-not-merge-label-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
branches: [main]
types: [labeled, unlabeled]

permissions:
contents: read

jobs:
labels-preventing-merge-check:
runs-on: ubuntu-latest
Expand All @@ -18,6 +21,11 @@ jobs:
# Labels that prevent merging
- 'DO NOT MERGE'
steps:
- name: Harden Runner
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
with:
egress-policy: audit

- name: 'Check "${{ matrix.label }}" label'
run: |
echo "::notice::Merging permission is diabled for PRs when the '${{ matrix.label }}' label is applied."
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/docs-verifier-tryfix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ on:
issue_comment:
types: [created]

permissions:
contents: read

jobs:
tryfix:
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/tryfix')
Expand All @@ -13,6 +16,11 @@ jobs:
IS_TRY_FIX: true # differentiates /tryfix from the validation-only run.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
with:
egress-policy: audit

- uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
id: get-pr
with:
Expand All @@ -30,14 +38,14 @@ jobs:
core.setFailed(`Request failed with error ${err}`)
}
- name: Checkout the repository
uses: actions/[email protected]
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Checkout Pull Request
run: |
hub pr checkout ${{ github.event.issue.number }}
- name: Tryfix
uses: dotnet/docs-actions/actions/docs-verifier@main
uses: dotnet/docs-actions/actions/docs-verifier@5e8bcc78465d45a7544bba56509a1a69922b6a5a # main

- name: Push changes
run: |
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/docs-verifier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@ jobs:
name: MSDocs build verifier
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
with:
egress-policy: audit

- name: Checkout the repository
uses: actions/[email protected]
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Validate
uses: dotnet/docs-actions/actions/docs-verifier@main
uses: dotnet/docs-actions/actions/docs-verifier@5e8bcc78465d45a7544bba56509a1a69922b6a5a # main
5 changes: 5 additions & 0 deletions .github/workflows/live-protection.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ jobs:
comment:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
with:
egress-policy: audit

- uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
env:
SHOULD_COMMENT: ${{ github.base_ref == 'refs/heads/live' && !(github.event.issue.user.login == 'cxwtool' || github.head_ref == 'refs/heads/main') }}
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/markdownlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,22 @@ on:
- ".github/workflows/markdownlint.yml"
- ".github/workflows/markdownlint-problem-matcher.json"

permissions:
contents: read

jobs:
lint:
runs-on: ubuntu-latest
permissions:
statuses: write

steps:
- uses: actions/[email protected]
- name: Harden Runner
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
with:
egress-policy: audit

- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Use Node.js
uses: actions/setup-node@eff380dfbcf941bf8832e4acb788cebe13dfd758
with:
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/no-response.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,21 @@ on:
# Schedule for five minutes after the hour, every hour
- cron: '5 * * * *'

permissions:
contents: read

jobs:
noResponse:
permissions:
issues: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
with:
egress-policy: audit

- uses: lee-dohm/no-response@9bb0a4b5e6a45046f00353d5de7d90fb8bd773bb
with:
token: ${{ github.token }}
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/profanity-filter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,14 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Harden Runner
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
with:
egress-policy: audit

- name: Profanity filter
if: ${{ github.actor != 'dependabot[bot]' && github.actor != 'github-actions[bot]' }}
uses: IEvangelist/profanity-filter@main
uses: IEvangelist/profanity-filter@5248b30a7d2a6c209eb0a7362502fe769856522f # main
id: profanity-filter
with:
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/quest-bulk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ on:
required: false
default: "5"

permissions:
contents: read

jobs:
bulk-import:
runs-on: ubuntu-latest
Expand All @@ -22,22 +25,27 @@ jobs:
id-token: write
if: ${{ github.repository_owner == 'dotnet' }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
with:
egress-policy: audit

- name: "Print manual bulk import run reason"
if: ${{ github.event_name == 'workflow_dispatch' }}
run: |
echo "Reason: ${{ github.event.inputs.reason }}"
- name: Azure OpenID Connect
id: azure-oidc-auth
uses: dotnet/docs-tools/.github/actions/oidc-auth-flow@main
uses: dotnet/docs-tools/.github/actions/oidc-auth-flow@5e8bcc78465d45a7544bba56509a1a69922b6a5a # main
with:
client-id: ${{ secrets.CLIENT_ID }}
tenant-id: ${{ secrets.TENANT_ID }}
audience: ${{ secrets.OSMP_API_AUDIENCE }}

- name: bulk-sequester
id: bulk-sequester
uses: dotnet/docs-tools/actions/sequester@main
uses: dotnet/docs-tools/actions/sequester@5e8bcc78465d45a7544bba56509a1a69922b6a5a # main
env:
ImportOptions__ApiKeys__GitHubToken: ${{ secrets.GITHUB_TOKEN }}
ImportOptions__ApiKeys__QuestKey: ${{ secrets.QUEST_KEY }}
Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/quest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ on:
description: "The issue number to manually test"
required: true

permissions:
contents: read

jobs:
import:
if: |
Expand All @@ -25,6 +28,11 @@ jobs:
id-token: write

steps:
- name: Harden Runner
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
with:
egress-policy: audit

- name: "Print manual run reason"
if: ${{ github.event_name == 'workflow_dispatch' }}
run: |
Expand All @@ -33,7 +41,7 @@ jobs:
- name: Azure OpenID Connect
id: azure-oidc-auth
uses: dotnet/docs-tools/.github/actions/oidc-auth-flow@main
uses: dotnet/docs-tools/.github/actions/oidc-auth-flow@5e8bcc78465d45a7544bba56509a1a69922b6a5a # main
with:
client-id: ${{ secrets.CLIENT_ID }}
tenant-id: ${{ secrets.TENANT_ID }}
Expand All @@ -43,7 +51,7 @@ jobs:
- name: manual-sequester
if: ${{ github.event_name == 'workflow_dispatch' }}
id: manual-sequester
uses: dotnet/docs-tools/actions/sequester@main
uses: dotnet/docs-tools/actions/sequester@5e8bcc78465d45a7544bba56509a1a69922b6a5a # main
env:
ImportOptions__ApiKeys__GitHubToken: ${{ secrets.GITHUB_TOKEN }}
ImportOptions__ApiKeys__AzureAccessToken: ${{ steps.azure-oidc-auth.outputs.access-token }}
Expand All @@ -59,7 +67,7 @@ jobs:
- name: auto-sequester
if: ${{ github.event_name != 'workflow_dispatch' }}
id: auto-sequester
uses: dotnet/docs-tools/actions/sequester@main
uses: dotnet/docs-tools/actions/sequester@5e8bcc78465d45a7544bba56509a1a69922b6a5a # main
env:
ImportOptions__ApiKeys__GitHubToken: ${{ secrets.GITHUB_TOKEN }}
ImportOptions__ApiKeys__AzureAccessToken: ${{ steps.azure-oidc-auth.outputs.access-token }}
Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/rebase-needed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,22 @@ on:
pull_request_target:
types: [synchronize]

permissions:
contents: read

jobs:
label-rebase-needed:
permissions:
pull-requests: write # for eps1lon/actions-label-merge-conflict to label PRs
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
with:
egress-policy: audit

- name: Check for merge conflicts
uses: eps1lon/actions-label-merge-conflict@releases/2.x
uses: eps1lon/actions-label-merge-conflict@fd1f295ee7443d13745804bc49fe158e240f6c6e # releases/2.x
with:
dirtyLabel: "rebase needed :construction:"
repoToken: "${{ secrets.GITHUB_TOKEN }}"
Expand Down
Loading

0 comments on commit a0f8b24

Please sign in to comment.