-
Notifications
You must be signed in to change notification settings - Fork 87
56 lines (50 loc) · 1.59 KB
/
renumber-sections.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Renumber standard TOC
# Triggers the workflow on pull request events that update the branch
on:
pull_request:
types: [opened, synchronize, reopened]
workflow_dispatch:
inputs:
reason:
description: 'The reason for running the workflow'
required: true
default: 'Manual run'
jobs:
renumber-sections:
runs-on: ubuntu-latest
permissions:
checks: write
pull-requests: write
env:
DOTNET_NOLOGO: true
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
steps:
- name: Check out our repo
uses: actions/checkout@v2
- name: Setup .NET 8.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 9.0.x
- name: Run section renumbering dry run
id: section-renumber
run: |
cd tools
./run-section-renumber.sh
- name: Trigger Workflow
uses: actions/github-script@v7
with:
script: |
github.rest.actions.createWorkflowDispatch({
owner: "dotnet",
repo: "csharpstandard",
workflow_id: 'report-status.yml',
ref: '${{ github.head_ref }}',
inputs: {
"head_sha": '${{ steps.section-renumber.output.head_sha }}',
"name": '${{ steps.section-renumber.output.check_name }}',
"conclusion": '${{ steps.section-renumber.output.conclusion }}',
"summary": '${{ steps.section-renumber.output.summary }}',
"annotations": '${{ steps.section-renumber.output.annotations }}'
}
})