Notify Backend on Query Changes #141
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: Notify Backend on Query Changes | |
| on: | |
| workflow_run: | |
| workflows: ["Validate Queries"] | |
| types: [completed] | |
| branches: [ main ] | |
| jobs: | |
| notify-backend: | |
| runs-on: ubuntu-latest | |
| if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
| steps: | |
| - name: Notify Backend Server | |
| env: | |
| BACKEND_URL: ${{ secrets.BACKEND_URL }} | |
| WEBHOOK_SECRET: ${{ secrets.WEBHOOK_SECRET }} | |
| run: | | |
| echo "Notifying backend of query changes..." | |
| curl -X GET "$BACKEND_URL/webhook/sync" \ | |
| -H "Authorization: Bearer $WEBHOOK_SECRET" \ | |
| --fail-with-body | |
| echo "Backend notification sent successfully" |