Skip to content

Commit e823159

Browse files
committed
ci: Trigger OS merge action in TTI repo
1 parent 5001068 commit e823159

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Trigger OS merge action in TTI repo
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- 'v3.*'
7+
types:
8+
- closed
9+
10+
jobs:
11+
trigger_merge:
12+
name: Trigger OS merge action in TTI repo
13+
if: ${{ github.repository == 'TheThingsNetwork/lorawan-stack' && github.event.pull_request.merged == true }}
14+
runs-on: ubuntu-24.04
15+
steps:
16+
- name: Trigger OS merge action in TTI repo
17+
uses: actions/github-script@v7
18+
with:
19+
github-token: ${{ secrets.BOT_TOKEN }}
20+
script: |
21+
const resp = await github.rest.repos.createDispatchEvent({
22+
owner: 'TheThingsIndustries',
23+
repo: 'lorawan-stack',
24+
event_type: 'merge-os-to-enterprise'
25+
});
26+
if (resp.status !== 204) {
27+
throw new Error(`Failed to trigger OS merge action: ${resp.status} ${resp.statusText}`);
28+
}
29+
console.log('Triggered OS merge action in TTI repo');

0 commit comments

Comments
 (0)