Skip to content
This repository was archived by the owner on Jan 3, 2025. It is now read-only.

Commit aad73c9

Browse files
committed
chore: update dispatch for latest docs site
Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>
1 parent ed1ac3e commit aad73c9

1 file changed

Lines changed: 15 additions & 18 deletions

File tree

.github/workflows/dispatch.yml

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,26 @@
1-
name: Repsitory dispatch workflow from docs-dm-master
1+
name: Trigger docs site update
22

33
on:
44
push:
55
branches:
66
- master
7+
- release-*
78

89
jobs:
9-
build:
10+
trigger:
1011
runs-on: ubuntu-latest
1112

1213
steps:
13-
- uses: actions/checkout@v2
14+
- name: Extract sha
15+
id: extract
16+
shell: bash
17+
run: |
18+
echo "::set-output name=sha::$(sha=${{ github.sha }}; echo ${sha:0:6})"
1419
15-
- name: Extract branch, repo and sha
16-
shell: bash
17-
id: extract_info
18-
run: |
19-
echo "::set-output name=branch::${GITHUB_REF#refs/heads/}"
20-
echo "::set-output name=repo::$(cut -d'/' -f2 <<< ${{ github.repository }})"
21-
echo "::set-output name=sha::$(sha=${{ github.sha }}; echo ${sha:0:6})"
22-
23-
# - name: Repository Dispatch
24-
# uses: peter-evans/repository-dispatch@v1.1.1
25-
# with:
26-
# token: ${{ secrets.PR_TRIGGER_BUILD_TOKEN }}
27-
# repository: pingcap/website-docs/
28-
# event-type: ${{ steps.extract_info.outputs.repo }}/${{ steps.extract_info.outputs.branch }}-${{ steps.extract_info.outputs.sha }}
29-
# client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "repo": "${{ github.repository }}"}'
20+
- name: Repository Dispatch
21+
uses: peter-evans/repository-dispatch@v1
22+
with:
23+
token: ${{ secrets.PR_TRIGGER_BUILD_TOKEN }}
24+
repository: pingcap/website-docs
25+
event-type: ${{ github.repository }}/${{ github.ref_name }}-${{ steps.extract.outputs.sha }}
26+
client-payload: '{ "repo": "${{ github.repository }}", "ref": "${{ github.ref_name }}", "sha": "${{ github.sha }}" }'

0 commit comments

Comments
 (0)