forked from withastro/docs
-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (38 loc) · 1.38 KB
/
event_push.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Send an event to other repos on push to main
name: event_push
on:
push:
branches: [main, staging, dev, release/*]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
GITHUB_TOKEN: ${{ secrets.PROSOPONATOR_PAT }}
GH_TOKEN: ${{ secrets.PROSOPONATOR_PAT }}
CARGO_TERM_COLOR: always
NODE_OPTIONS: "--max-old-space-size=4096"
defaults:
run:
shell: bash
jobs:
event:
runs-on: ubuntu-latest
steps:
- name: Print contexts
uses: prosopo/captcha/.github/actions/print_contexts@main
with:
INPUTS_CONTEXT: ${{ toJson(inputs) }}
NEEDS_CONTEXT: ${{ toJson(needs) }}
VARS_CONTEXT: ${{ toJson(vars) }}
SECRETS_CONTEXT: ${{ toJson(secrets) }}
- name: Send event
run: |
curl -X POST \
-H "Authorization: token $GITHUB_TOKEN" \
-H "Accept: application/vnd.github.everest-preview+json" \
-d '{"event_type": "capctha_push", "client_payload": { \
"branch": "${{ github.ref_name }}" \
"commit": "${{ github.sha }}"
}}' \
https://api.github.com/repos/prosopo/captcha-private/dispatches