After receive PR #45
This file contains 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: After receive PR | |
# access to secrets | |
on: | |
workflow_run: | |
workflows: ["Receive PR"] | |
types: | |
- completed | |
jobs: | |
notify: | |
runs-on: ubuntu-latest | |
if: > | |
github.event.workflow_run.event == 'pull_request' && | |
github.event.workflow_run.conclusion == 'success' | |
steps: | |
- name: Download workflow artifact | |
uses: dawidd6/action-download-artifact@v2.11.0 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
workflow: receive-pr.yml | |
run_id: ${{ github.event.workflow_run.id }} | |
- name: Read the pr_num file | |
id: pr_num_reader | |
uses: juliangruber/read-file-action@v1.0.0 | |
with: | |
path: ./pr_num/pr_num.txt | |
- name: Set pr link | |
id: pr_link_generator | |
run: echo "LINK=https://github.com/${{ github.repository }}/pull/${{ steps.pr_num_reader.outputs.content }}" >> $GITHUB_OUTPUT | |
- name: notify | |
uses: docker://tencentcom/wecom-message:latest | |
env: | |
PLUGIN_ROBOT: ${{ secrets.WEWORK_BOT }} | |
PLUGIN_CONTENT: | | |
[${{ steps.pr_link_generator.outputs.LINK }}](${{ steps.pr_link_generator.outputs.LINK }}) | |
走查代码啦~ for ${{ github.actor }} |