Skip to content

Commit 590f682

Browse files
committed
setup for tools repo
1 parent 1b2b8e7 commit 590f682

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/tools-events.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Forward key events to the docs-tools repository
2+
on:
3+
pull_request:
4+
push:
5+
create:
6+
delete:
7+
release:
8+
jobs:
9+
dispatch-events:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Create event name
13+
run: |
14+
EVENT_PREFIX="docs-${GITHUB_REPOSITORY//\//-}"
15+
echo EVENT_PREFIX="${EVENT_PREFIX@L}" >> $GITHUB_ENV
16+
- name: Repository Dispatch
17+
uses: peter-evans/repository-dispatch@v3
18+
with:
19+
token: ${{ secrets.TOOLS_EVENT_SYNC_PAT }}
20+
repository: enterprisedb/docs-tools
21+
event-type: ${{ env.EVENT_PREFIX }}-${{ github.event_name }}
22+
client-payload: |
23+
{
24+
"ref": "${{ github.head_ref || github.ref }}",
25+
"ref_type": "${{ github.ref_type }}",
26+
"ref_name": "${{ github.ref_name }}",
27+
"repo": "${{ github.repository }}",
28+
"sha": "${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}",
29+
"type": "${{ github.event_name }}",
30+
"push": {
31+
"before": "${{ github.event.before || '' }}",
32+
"after": "${{ github.event.after || '' }}",
33+
"created": "${{ github.event.created || false }}",
34+
"deleted": "${{ github.event.deleted || false }}"
35+
},
36+
"action": "${{ github.event.action }}",
37+
"number": "${{ github.event.number }}",
38+
"release": {
39+
"tag_name": "${{ github.event.release && github.event.release.tag_name || '' }}",
40+
"id": "${{ github.event.release && github.event.release.id || '' }}",
41+
"tag": "${{ github.event.release && github.event.release.tag_name || '' }}",
42+
"name": "${{ github.event.release && github.event.release.name || '' }}",
43+
"body": "${{ github.event.release && github.event.release.body || '' }}",
44+
"draft": "${{ github.event.release && github.event.release.draft || false }}"
45+
}
46+
}

0 commit comments

Comments
 (0)