ci: add pr audit workflow (#22701)

Co-authored-by: Alexey Shekhirin <5773434+shekhirin@users.noreply.github.com>
Co-authored-by: Amp <amp@ampcode.com>
Co-authored-by: Tanishk Goyal <64212892+legion2002@users.noreply.github.com>
This commit is contained in:
Derek Cofausper
2026-03-02 03:22:28 -08:00
committed by GitHub
parent d6af5793e5
commit 514b2898aa

30
.github/workflows/pr-audit.yml vendored Normal file
View File

@@ -0,0 +1,30 @@
name: Pull request audit
on:
pull_request:
types: [labeled]
jobs:
publish:
runs-on: ubuntu-latest
if: github.event.label.name == 'cyclops'
steps:
- name: Publish event
run: |
set -euo pipefail
echo "${{ secrets.EVENTS_KEY }}" > ${{ runner.temp }}/key
echo "${{ secrets.EVENTS_CERT }}" > ${{ runner.temp }}/cert
curl -sf -o /dev/null -X POST ${{ secrets.EVENTS_ARGS }} \
-H "Content-Type: application/json" \
--key ${{ runner.temp }}/key \
--cert ${{ runner.temp }}/cert \
-d '{
"repository": "${{ github.repository }}",
"event": "pr_audit",
"data": {
"pr_number": ${{ github.event.pull_request.number }},
"sha": "${{ github.event.pull_request.head.sha }}"
}
}'