ITADN
foxundermoon/feishu-action
README.md
以下内容由 AI 翻译,如有问题请点此提交 issue 反馈

wechat-work-action status

✨ 使用示例

  • 文本
- name: text message
  uses: foxundermoon/feishu-action@v2
  with:
    url: ${{ secrets.FEISHU_BOT_WEBHOOK_URL }}
    msg_type: text
    content: |
      text: |
        hahahah
        from github action test
        repository: ${{ github.repository }}
        committer: ${{ github.actor }}
        compare: ${{ github.event.compare }}
        job status: ${{ job.status }}
  • 发布
- name: post message
  uses: foxundermoon/feishu-action@v2
  with:
    url: ${{ secrets.FEISHU_BOT_WEBHOOK_URL }}
    msg_type: post
    content: |
      post:
        zh_cn:
          title: 我是一个标题
          content:
          - - tag: text
              un_escape: true
              text: '第一行 :'
            - tag: a
              text: 超链接
              href: http://www.feishu.cn
            - tag: at
              user_id: ou_18eac85d35a26f989317ad4f02e8bbbb
          - - tag: text
              text: '第二行 :'
            - tag: text
              text: 文本测试
          - - tag: img
              image_key: d640eeea-4d2f-4cb3-88d8-c964fab53987
              width: 300
              height: 300
  • 分享聊天记录
- name: share_chat message
  uses: foxundermoon/feishu-action@v2
  with:
    url: ${{ secrets.FEISHU_BOT_WEBHOOK_URL }}
    msg_type: share_chat
    content: |
      share_chat_id: oc_f5b1a7eb27ae2c7b6adc2a74faf339ff
  • 图像
- name: image message
  uses: foxundermoon/feishu-action@v2
  with:
    url: ${{ secrets.FEISHU_BOT_WEBHOOK_URL }}
    msg_type: image
    content: |
      image_key: img_ecffc3b9-8f14-400f-a014-05eca1a4310g

🔐 在此处设置您的密钥:https://github.com/USERNAME/REPO/settings/secrets

GitHub Actions 的上下文与表达式语法说明,请参见:https://help.github.com/en/articles/contexts-and-expression-syntax-for-github-actions#github-context

结果

选项

选项类型描述
url字符串webhook 地址:https://open.feishu.cn/open-apis/bot/hook/7c5a4a4ba83bxxxxxx
msg_type字符串消息类型
content字符串消息内容,即 YAML 字符串

如何在群聊中使用机器人?