File tree Expand file tree Collapse file tree 2 files changed +15
-17
lines changed
Expand file tree Collapse file tree 2 files changed +15
-17
lines changed Original file line number Diff line number Diff line change @@ -65,13 +65,11 @@ jobs:
6565
6666 - name : Send failure event to PostHog
6767 if : failure()
68- 69- # A CDP destination is set-up to alert when we get this event
70- with :
71- posthog-token : ' ${{ secrets.PERSONAL_ACCESS_KEY }}'
72- event : ' posthog-examples-repo-test-failure'
73- properties : >-
74- {
68+ run : |
69+ curl -X POST https://webhooks.us.posthog.com/public/webhooks/019a7a81-7961-0000-d3e3-b5f34cc2a32b \
70+ -H "Content-Type: application/json" \
71+ -d '{
72+ "event": "posthog-examples-repo-test-failure",
7573 "commitSha": "${{ github.sha }}",
7674 "jobStatus": "${{ job.status }}",
7775 "commitMessage": "${{ github.event.head_commit.message }}",
8078 "workflow": "${{ github.workflow }}",
8179 "runId": "${{ github.run_id }}",
8280 "runNumber": "${{ github.run_number }}",
81+ "jobUrl": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}",
8382 "matrixExample": "${{ matrix.example }}"
84- }
83+ }'
8584
8685 - uses : actions/upload-artifact@v4
8786 if : always()
Original file line number Diff line number Diff line change @@ -66,14 +66,12 @@ jobs:
6666 NEXT_PUBLIC_POSTHOG_HOST : ${{ vars.NEXT_PUBLIC_POSTHOG_HOST }}
6767
6868 - name : Send failure event to PostHog
69- if : failure()
70- 71- # A CDP destination is set-up to alert when we get this event
72- with :
73- posthog-token : ' ${{ secrets.PERSONAL_ACCESS_KEY }}'
74- event : ' posthog-examples-repo-test-failure'
75- properties : >-
76- {
69+ if : failure()
70+ run : |
71+ curl -X POST https://webhooks.us.posthog.com/public/webhooks/019a7a81-7961-0000-d3e3-b5f34cc2a32b \
72+ -H "Content-Type: application/json" \
73+ -d '{
74+ "event": "posthog-examples-repo-test-failure",
7775 "commitSha": "${{ github.sha }}",
7876 "jobStatus": "${{ job.status }}",
7977 "commitMessage": "${{ github.event.head_commit.message }}",
8280 "workflow": "${{ github.workflow }}",
8381 "runId": "${{ github.run_id }}",
8482 "runNumber": "${{ github.run_number }}",
83+ "jobUrl": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}",
8584 "example": "${{ matrix.example }}"
86- }
85+ }'
8786
8887 - uses : actions/upload-artifact@v4
8988 if : always()
You can’t perform that action at this time.
0 commit comments