-
Notifications
You must be signed in to change notification settings - Fork 78
29 lines (25 loc) · 997 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 blog-cn
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})"
# stop triggering new webstie builidng
# - name: Repository Dispatch
# uses: peter-evans/[email protected]
# with:
# token: ${{ secrets.GH_TOKEN }}
# repository: pingcap/website/
# 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 }}"}'