Skip to content

Commit 533a46b

Browse files
authored
Merge pull request #3764 from IgniteUI/sstoychev/cd-trigger
feat(cd): adding dispatch workflow for cd
2 parents e246e42 + 7d85864 commit 533a46b

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Trigger Deployment Workflow
2+
3+
on:
4+
push:
5+
branches:
6+
- vnext
7+
- master
8+
workflow_dispatch:
9+
inputs:
10+
branch:
11+
description: 'Input a branch name (e.g., vnext)'
12+
required: true
13+
14+
permissions:
15+
contents: read
16+
jobs:
17+
trigger:
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- name: Trigger Workflow in Another Repository
22+
run: |
23+
# Set the required variables
24+
repo_owner="IgniteUI"
25+
repo_name="igniteui-actions"
26+
event_type="igniteui-angular-samples-cd"
27+
branch="${{ github.ref_name }}"
28+
29+
curl -L \
30+
-X POST \
31+
-H "Accept: application/vnd.github+json" \
32+
-H "Authorization: Bearer ${{ secrets.PAT }}" \
33+
-H "X-GitHub-Api-Version: 2022-11-28" \
34+
https://api.github.com/repos/$repo_owner/$repo_name/dispatches \
35+
-d "{\"event_type\": \"$event_type\", \"client_payload\": {\"branch\": \"$branch\", \"unit\": false, \"integration\": true}}"

0 commit comments

Comments
 (0)