forked from pingcap/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
29 lines (24 loc) · 957 Bytes
/
dispatch.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
name: Repsitory dispatch workflow from docs
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Extract branch, repo and sha
shell: bash
id: extract_info
run: |
echo "::set-output name=branch::${GITHUB_REF#refs/heads/}"
echo "::set-output name=repo::$(cut -d'/' -f2 <<< ${{ github.repository }})"
echo "::set-output name=sha::$(sha=${{ github.sha }}; echo ${sha:0:6})"
- name: Repository Dispatch
uses: peter-evans/[email protected]
with:
token: ${{ secrets.PR_TRIGGER_BUILD_TOKEN }}
repository: pingcap/website-docs/
event-type: ${{ steps.extract_info.outputs.repo }}/${{ steps.extract_info.outputs.branch }}-${{ steps.extract_info.outputs.sha }}
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "repo": "${{ github.repository }}"}'