File tree 1 file changed +28
-0
lines changed
1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Release Merged Hook
2
+
3
+ on :
4
+ pull_request :
5
+ types : [closed]
6
+ branches :
7
+ - master
8
+
9
+ jobs :
10
+ trigger-dispatch :
11
+ if : github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release/v')
12
+ runs-on : ubuntu-latest
13
+ steps :
14
+ - name : Extract Version from Branch Name
15
+ id : version-extract
16
+ run : echo "version=${{ github.event.pull_request.head.ref }}" >> $GITHUB_ENV
17
+ shell : bash
18
+
19
+ - name : Trigger Repository Dispatch Event
20
+ env :
21
+ VERSION : ${{ env.version }}
22
+ run : |
23
+ VERSION=${VERSION#"release/"}
24
+ curl -X POST -H "Accept: application/vnd.github.v3+json" \
25
+ -H "Authorization: token ${{ secrets.PERSONAL_ACCESS_TOKEN }}" \
26
+ "https://api.github.com/repos/${{ secrets.DISPATCH_OWNER }}/${{ secrets.DISPATCH_REPO }}/dispatches" \
27
+ -d "{\"event_type\":\"release_merged\", \"client_payload\": {\"version\":\"${VERSION}\"}}"
28
+
You can’t perform that action at this time.
0 commit comments