SDK sync PR Copilot analysis #2
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: SDK sync PR Copilot analysis | |
| on: | |
| workflow_run: | |
| workflows: ["SDK sync PR build"] | |
| types: [completed] | |
| permissions: | |
| actions: read | |
| contents: read | |
| pull-requests: write | |
| jobs: | |
| copilot-twister-analysis: | |
| if: | | |
| github.event.workflow_run.event == 'pull_request' && | |
| github.event.workflow_run.head_branch == 'sdk-sync/test' | |
| runs-on: ubuntu-24.04 | |
| env: | |
| GH_TOKEN: ${{ secrets.SDK_SYNC_PAT }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Download Twister analysis artifact | |
| uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| run-id: ${{ github.event.workflow_run.id }} | |
| name: sdk-sync-twister-analysis | |
| path: sdk-sync-twister-analysis | |
| - name: Set up Python | |
| uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5 | |
| with: | |
| python-version: "3.12" | |
| cache: pip | |
| cache-dependency-path: scripts/sdk_sync/requirements.txt | |
| - name: Install dependencies | |
| run: pip install -r scripts/sdk_sync/requirements.txt | |
| - name: Trigger Copilot Twister analysis | |
| continue-on-error: true | |
| run: | | |
| python scripts/sdk_sync/trigger_copilot_analysis.py \ | |
| --artifact-dir sdk-sync-twister-analysis \ | |
| --workflow-run-id "${{ github.event.workflow_run.id }}" \ | |
| --workflow-run-url "${{ github.event.workflow_run.html_url }}" |