Update main.yml #4
Workflow file for this run
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: Send PR events to MS Power Automate | |
| on: | |
| pull_request_target: | |
| types: [opened, reopened, ready_for_review] | |
| jobs: | |
| notify-power-automate: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Prepare and send PR event to Power Automate | |
| env: | |
| FLOW_URL: ${{ secrets.FLOW_WEBHOOK_URL }} | |
| run: | | |
| set -euo pipefail | |
| echo "→ Sending pull_request event to Power Automate..." | |
| curl -sS -X POST \ | |
| -H "Content-Type: application/json" \ | |
| -H "X-GitHub-Event: pull_request" \ | |
| -H "X-Repository: $GITHUB_REPOSITORY" \ | |
| --data-binary "@$GITHUB_EVENT_PATH" \ | |
| "$FLOW_URL" | |
| echo "✅ Event sent for PR #${{ github.event.number }} in ${{ github.repository }}" |