Skip to content

Commit 5d14a31

Browse files
committed
fix(cd): rewriting to use gh cli
1 parent f2eb75a commit 5d14a31

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

.github/workflows/deploy-trigger.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,16 @@ jobs:
1919

2020
steps:
2121
- name: Trigger Workflow in Another Repository
22+
env:
23+
GH_TOKEN: ${{ secrets.CLASSIC_PATKA }}
2224
run: |
2325
# Set the required variables
24-
repo_owner="IgniteUI"
25-
repo_name="igniteui-actions"
26+
repo="IgniteUI/igniteui-actions"
2627
event_type="igniteui-angular-samples-cd"
2728
branch="${{ github.ref_name }}"
2829
29-
curl -L \
30-
-X POST \
31-
-H "Accept: application/vnd.github+json" \
32-
-H "Authorization: Bearer ${{ secrets.CLASSIC_PATKA }}" \
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}}"
30+
# Trigger repository dispatch using GitHub CLI
31+
gh api repos/$repo/dispatches \
32+
--method POST \
33+
--field event_type="$event_type" \
34+
--raw-field client_payload="{\"branch\": \"$branch\", \"unit\": false, \"integration\": true}"

0 commit comments

Comments
 (0)