File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8787 fi
8888
8989 - name : Create PR
90+ id : create-pr
9091 uses : peter-evans/create-pull-request@v5
9192 with :
9293 path : discourse_api_docs
9798 author : discoursebuild <build@discourse.org>
9899 body : |
99100 Updates Documentation with changes from Discourse core
101+
102+ - name : Trigger validation
103+ if : steps.create-pr.outputs.pull-request-number
104+ run : |
105+ curl -X POST \
106+ -H "Accept: application/vnd.github.v3+json" \
107+ -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
108+ https://api.github.com/repos/${{ github.repository }}/dispatches \
109+ -d '{"event_type":"docs-updated","client_payload":{"branch":"update-documentation"}}'
Original file line number Diff line number Diff line change 55 types : [opened, synchronize, reopened]
66 paths :
77 - ' openapi.json'
8- workflow_run :
9- workflows : ["Update Docs"]
10- types : [completed]
11- branches : [main]
8+ repository_dispatch :
9+ types : [docs-updated]
1210
1311jobs :
1412 validate-openapi :
@@ -22,11 +20,11 @@ jobs:
2220 with :
2321 fetch-depth : 0
2422
25- - name : Checkout workflow run
26- if : github.event_name == 'workflow_run '
23+ - name : Checkout docs-updated branch
24+ if : github.event_name == 'repository_dispatch '
2725 uses : actions/checkout@v4
2826 with :
29- ref : ${{ github.event.workflow_run.head_branch }}
27+ ref : ${{ github.event.client_payload.branch }}
3028 fetch-depth : 0
3129
3230 - name : Start Swagger Validator
You can’t perform that action at this time.
0 commit comments