Skip to content

Commit 1db16f7

Browse files
committed
chore(cd): try with official actions
1 parent 7c3a60b commit 1db16f7

1 file changed

Lines changed: 19 additions & 14 deletions

File tree

.github/workflows/deploy-trigger.yml

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +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_owner="IgniteUI"
25-
repo_name="igniteui-actions"
26-
event_type="igniteui-angular-samples-cd"
27-
branch="${{ github.ref_name }}"
28-
29-
# Trigger repository dispatch using GitHub CLI
30-
gh api repos/$repo/dispatches \
31-
--method POST \
32-
--field event_type="$event_type" \
33-
--raw-field client_payload="{\"branch\": \"$branch\", \"unit\": false, \"integration\": true}"
34-
env:
35-
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)