Skip to content

Commit f0f5c48

Browse files
committed
chore(cd): try with official actions
1 parent d3eefb0 commit f0f5c48

File tree

1 file changed

+19
-13
lines changed

1 file changed

+19
-13
lines changed

.github/workflows/deploy-trigger.yml

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,23 @@ jobs:
1818
runs-on: ubuntu-latest
1919

2020
steps:
21+
- name: Setup GitHub CLI
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: '18'
25+
2126
- name: Trigger Workflow in Another Repository
22-
run: |
23-
# Set the required variables
24-
repo="IgniteUI/igniteui-actions"
25-
event_type="igniteui-angular-samples-cd"
26-
branch="${{ github.ref_name }}"
27-
28-
# Trigger repository dispatch using GitHub CLI
29-
gh api repos/$repo/dispatches \
30-
--method POST \
31-
--field event_type="$event_type" \
32-
--raw-field client_payload="{\"branch\": \"$branch\", \"unit\": false, \"integration\": true}"
33-
env:
34-
GH_TOKEN: ${{ secrets.CLASSIC_PATKA }}
27+
uses: actions/github-script@v7
28+
with:
29+
github-token: ${{ secrets.CLASSIC_PATKA }}
30+
script: |
31+
await github.rest.repos.createDispatchEvent({
32+
owner: 'IgniteUI',
33+
repo: 'igniteui-actions',
34+
event_type: 'igniteui-angular-samples-cd',
35+
client_payload: {
36+
branch: '${{ github.ref_name }}',
37+
unit: false,
38+
integration: true
39+
}
40+
});

0 commit comments

Comments
 (0)