Merge pull request #133 from merico-dev/update-release-notes-with-toc… #228
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Dispath to staging | |
| on: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| trigger: | |
| 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: Repository Dispatch | |
| uses: peter-evans/repository-dispatch@v1 | |
| with: | |
| token: ${{ secrets.DISPATCH_TOKEN }} | |
| repository: merico-dev/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 }}", "env": "staging" }' | |
| notify-feishu-on-failure: | |
| runs-on: ubuntu-latest | |
| needs: trigger | |
| if: failure() | |
| steps: | |
| - name: Send notification to Feishu on failure | |
| run: | | |
| curl -X POST ${{ secrets.FEISHU_CI_BOT_WEBHOOK_URL }} \ | |
| -H 'Content-Type: application/json' \ | |
| -d '{ | |
| "msg_type": "text", | |
| "content": { | |
| "text": "⚠️ GitHub Action 失败通知:官网文档分发预演失败!\n- 仓库: ${{ github.repository }}\n- 分支: ${{ github.ref }}\n- 工作流: ${{ github.workflow }}\n- 触发人: ${{ github.actor }}\n- 查看日志: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" | |
| } | |
| }' |