Skip to content

Commit 1bd1d32

Browse files
authored
Merge pull request #26127 from MicrosoftDocs/main
publish workflow updates
2 parents f2c57be + ec6c6d5 commit 1bd1d32

6 files changed

Lines changed: 101 additions & 17 deletions

File tree

Lines changed: 32 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,41 @@
1-
name: Auto label and assign pull requests
1+
name: Assign and label PR
22

33
permissions:
44
pull-requests: write
55
contents: read
6+
actions: read
67

7-
on: [pull_request_target]
8+
on:
9+
workflow_run:
10+
workflows: [Background tasks]
11+
types:
12+
- completed
813

914
jobs:
15+
download-payload:
16+
name: Download and extract payload artifact
17+
uses: MicrosoftDocs/microsoft-365-docs/.github/workflows/Shared-ExtractPayload.yml@workflows-prod
18+
with:
19+
WorkflowId: ${{ github.event.workflow_run.id }}
20+
OrgRepo: ${{ github.repository }}
21+
secrets:
22+
AccessToken: ${{ secrets.GITHUB_TOKEN }}
1023

11-
auto-label-assign:
12-
uses: MicrosoftDocs/microsoft-365-docs/.github/workflows/Shared-AutoLabelAssign.yml@workflows-prod
13-
with:
14-
PayloadJson: ${{ toJSON(github) }}
15-
AutoAssignUsers: 1
16-
AutoLabel: 1
17-
ExcludedUserList: '["user1", "user2"]'
18-
ExcludedBranchList: '["branch1", "branch2"]'
19-
secrets:
20-
AccessToken: ${{ secrets.GITHUB_TOKEN }}
24+
label-assign:
25+
name: Run assign and label
26+
needs: [download-payload]
27+
uses: MicrosoftDocs/microsoft-365-docs/.github/workflows/Shared-AutoLabelAssign.yml@workflows-prod
28+
with:
29+
PayloadJson: ${{ needs.download-payload.outputs.WorkflowPayload }}
30+
AutoAssignUsers: 1
31+
AutoLabel: 1
32+
ExcludedUserList: '["user1", "user2"]'
33+
ExcludedBranchList: '["branch1", "branch2"]'
34+
secrets:
35+
AccessToken: ${{ secrets.GITHUB_TOKEN }}
36+
37+
38+
39+
2140

22-
23-
41+
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Auto label Microsoft contributors
2+
3+
permissions:
4+
pull-requests: write
5+
contents: read
6+
actions: read
7+
8+
on:
9+
workflow_run:
10+
workflows: [Background tasks]
11+
types:
12+
- completed
13+
14+
jobs:
15+
download-payload:
16+
if: github.repository_visibility == 'public'
17+
name: Download and extract payload artifact
18+
uses: MicrosoftDocs/microsoft-365-docs/.github/workflows/Shared-ExtractPayload.yml@workflows-prod
19+
with:
20+
WorkflowId: ${{ github.event.workflow_run.id }}
21+
OrgRepo: ${{ github.repository }}
22+
secrets:
23+
AccessToken: ${{ secrets.GITHUB_TOKEN }}
24+
25+
label-msft:
26+
name: Label Microsoft contributors
27+
if: github.repository_visibility == 'public'
28+
needs: [download-payload]
29+
uses: MicrosoftDocs/microsoft-365-docs/.github/workflows/Shared-AutoLabelMsftContributor.yml@workflows-prod
30+
with:
31+
PayloadJson: ${{ needs.download-payload.outputs.WorkflowPayload }}
32+
secrets:
33+
AccessToken: ${{ secrets.GITHUB_TOKEN }}
34+
TeamReadAccessToken: ${{ secrets.ORG_READTEAMS_TOKEN }}
35+
36+
37+
38+
39+
40+
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Background tasks
2+
3+
permissions:
4+
pull-requests: write
5+
contents: read
6+
7+
on:
8+
pull_request_target:
9+
10+
jobs:
11+
upload:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Save payload data
16+
env:
17+
PayloadJson: ${{ toJSON(github) }}
18+
AccessToken: ${{ github.token }}
19+
run: |
20+
mkdir -p ./pr
21+
echo $PayloadJson > ./pr/PayloadJson.json
22+
sed -i -e "s/$AccessToken/XYZ/g" ./pr/PayloadJson.json
23+
- uses: actions/upload-artifact@v4
24+
with:
25+
name: PayloadJson
26+
path: pr/

.github/workflows/LiveMergeCheck.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Check max/live-compare-merge below
1+
name: PR can merge into branch
22

33
permissions:
44
pull-requests: write

.github/workflows/PrFileCount.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Check max/pr-file-count below
1+
name: PR file count less than limit
22

33
permissions:
44
pull-requests: write

.github/workflows/ProtectedFiles.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Check max/protected-file-check below
1+
name: PR has no protected files
22

33
permissions:
44
pull-requests: write

0 commit comments

Comments
 (0)