File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Auto-merge OpenAPI updates
2-
32on :
43 pull_request :
5- types : [opened, synchronize]
4+ types : [opened, synchronize, closed ]
65
76jobs :
87 auto-merge :
98 if : |
9+ github.event_name == 'pull_request' &&
1010 startsWith(github.head_ref, 'auto/update-openapi') &&
1111 github.event.pull_request.head.repo.full_name == github.repository &&
1212 github.event.pull_request.user.login == '0x-automation[bot]'
1313 runs-on : ubuntu-latest
14-
1514 permissions :
1615 pull-requests : write
1716 contents : write
18-
1917 steps :
2018 - name : Enable auto-merge
2119 run : gh pr merge --auto --squash "$PR_URL"
2220 env :
2321 PR_URL : ${{ github.event.pull_request.html_url }}
2422 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
25-
2623 - name : Log merge status
2724 run : |
2825 echo "✅ Auto-merge enabled for PR: ${{ github.event.pull_request.html_url }}"
26+
27+ publish-after-merge :
28+ if : |
29+ github.event_name == 'pull_request' &&
30+ github.event.pull_request.merged == true &&
31+ startsWith(github.head_ref, 'auto/update-openapi') &&
32+ github.event.pull_request.user.login == '0x-automation[bot]'
33+ runs-on : ubuntu-latest
34+ permissions :
35+ actions : write
36+ steps :
37+ - name : Trigger publish-docs workflow
38+ run : |
39+ gh workflow run publish-docs.yml --ref main
40+ echo "✅ Triggered publish-docs workflow after merge of PR: ${{ github.event.pull_request.html_url }}"
41+ env :
42+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments