fix(cd): rewriting to use gh cli #6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Trigger Deployment Workflow | |
| on: | |
| push: | |
| branches: | |
| - vnext | |
| - master | |
| workflow_dispatch: | |
| inputs: | |
| branch: | |
| description: 'Input a branch name (e.g., vnext)' | |
| required: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| trigger: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Trigger Workflow in Another Repository | |
| env: | |
| GH_TOKEN: ${{ secrets.CLASSIC_PATKA }} | |
| run: | | |
| # Set the required variables | |
| repo="IgniteUI/igniteui-actions" | |
| event_type="igniteui-angular-samples-cd" | |
| branch="${{ github.ref_name }}" | |
| # Trigger repository dispatch using GitHub CLI | |
| gh api repos/$repo/dispatches \ | |
| --method POST \ | |
| --field event_type="$event_type" \ | |
| --raw-field client_payload="{\"branch\": \"$branch\", \"unit\": false, \"integration\": true}" |