Skip to content

Commit 28101bf

Browse files
authored
Update auto-merge-openapi-updates.yml to publish after merge
1 parent 3730b83 commit 28101bf

1 file changed

Lines changed: 19 additions & 5 deletions

File tree

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,42 @@
11
name: Auto-merge OpenAPI updates
2-
32
on:
43
pull_request:
5-
types: [opened, synchronize]
4+
types: [opened, synchronize, closed]
65

76
jobs:
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 }}

0 commit comments

Comments
 (0)