Skip to content

Commit e005744

Browse files
committed
feat(cd): adding dispatch workflow for cd
1 parent b82baa2 commit e005744

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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+
jobs:
15+
trigger:
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Trigger Workflow in Another Repository
20+
run: |
21+
# Set the required variables
22+
repo_owner="IgniteUI"
23+
repo_name="igniteui-actions"
24+
event_type="igniteui-angular-samples-cd"
25+
branch="${{ github.ref_name }}"
26+
27+
curl -L \
28+
-X POST \
29+
-H "Accept: application/vnd.github+json" \
30+
-H "Authorization: Bearer ${{ secrets.PAT }}" \
31+
-H "X-GitHub-Api-Version: 2022-11-28" \
32+
https://api.github.com/repos/$repo_owner/$repo_name/dispatches \
33+
-d "{\"event_type\": \"$event_type\", \"client_payload\": {\"branch\": \"$branch\", \"unit\": false, \"integration\": true}}"

0 commit comments

Comments
 (0)