crontab 工具希望增加展示最近几次的执行时间 #176
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: Issue and Discussions Trigger | |
on: | |
issues: | |
types: [opened] | |
discussion: | |
types: [created] | |
jobs: | |
send_message: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Send message | |
run: | | |
generate_post_data(){ | |
text="有新的 Discussion" | |
if [ ${{ github.event_name }} == "issues" ]; then | |
text="有新的 Issue" | |
fi | |
cat <<EOF | |
{ | |
"msg_type": "text", | |
"content": { | |
"text": "$text" | |
} | |
} | |
EOF | |
} | |
curl -X POST -H "Content-Type: application/json" \ | |
-d "$(generate_post_data)" \ | |
https://open.feishu.cn/open-apis/bot/v2/hook/${{ secrets.FEISHU_BOT_WEBHOOK_URL }} |