Skip to content

Commit

Permalink
Update dispatch.yml (#10773) (#10795)
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-chi-bot committed Aug 5, 2022
1 parent 1339255 commit b6a4062
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions .github/workflows/dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,25 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Extract sha
id: extract
shell: bash
run: |
echo "::set-output name=sha::$(sha=${{ github.sha }}; echo ${sha:0:6})"
- name: Extract sha
id: extract
shell: bash
run: |
echo "::set-output name=sha::$(sha=${{ github.sha }}; echo ${sha:0:6})"
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v1
with:
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.PR_TRIGGER_BUILD_TOKEN }}
repository: pingcap/website-docs
event-type: ${{ github.repository }}/${{ github.ref_name }}-${{ steps.extract.outputs.sha }}
client-payload: '{ "repo": "${{ github.repository }}", "ref": "${{ github.ref_name }}", "sha": "${{ github.sha }}" }'

- name: trigger docs-staging workflow
run: |
curl \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: token ${{ secrets.DOCS_STAGING }}" \
https://api.github.com/repos/pingcap/docs-staging/actions/workflows/update.yml/dispatches \
-d '{"ref":"main","inputs":{"full": "false", "repo":"${{ github.repository }}","branch":"${{ github.ref_name }}"}}'

0 comments on commit b6a4062

Please sign in to comment.