Skip to content

Latest commit

 

History

History
132 lines (122 loc) · 8.68 KB

README.md

File metadata and controls

132 lines (122 loc) · 8.68 KB

pushNotifications

Version GitHub Workflow Status Documentation Maintenance License: MIT

pushNotifications

pushNotifications 是基于push-all-in-one 封装的github action版本。也可使用 @dext7r/push-notifications,在node环境下使用

action

新建一个workflow文件

name: Push Notifications

on:
push:
  branches:
    - main

jobs:
push-notifications:
  runs-on: ubuntu-latest

  steps:
  - name: Checkout code
    uses: actions/checkout@v2

  - name: Run Push Notifications action
    uses: dext7r/push-notifications@v1.0.1
    with:
      TYPE: ${{ secrets.TYPE }}
      TITLE: ${{ secrets.TITLE }}
      DESP: ${{ secrets.DESP }}
      SCTKEY: ${{ secrets.SCTKEY }}
      ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
      SECRET: ${{ secrets.SECRET }}
      WX_ROBOT_KEY: ${{ secrets.WX_ROBOT_KEY }}
      MSG_TYPE: ${{ secrets.MSG_TYPE }}
      EMAIL_TYPE: ${{ secrets.EMAIL_TYPE }}
      EMAIL_TO_ADDRESS: ${{ secrets.EMAIL_TO_ADDRESS }}
      EMAIL_AUTH_USER: ${{ secrets.EMAIL_AUTH_USER }}
      EMAIL_AUTH_PASS: ${{ secrets.EMAIL_AUTH_PASS }}
      EMAIL_HOST: ${{ secrets.EMAIL_HOST }}
      EMAIL_PORT: ${{ secrets.EMAIL_PORT }}
      WX_APP_CORPID: ${{ secrets.WX_APP_CORPID }}
      WX_APP_AGENTID: ${{ secrets.WX_APP_AGENTID }}
      WX_APP_SECRET: ${{ secrets.WX_APP_SECRET }}
      WX_APP_USERID: ${{ secrets.WX_APP_USERID }}
      PUSH_PLUS_TOKEN: ${{ secrets.PUSH_PLUS_TOKEN }}
      TEMPLATE_TYPE: ${{ secrets.TEMPLATE_TYPE }}
      CHANNEL_TYPE: ${{ secrets.CHANNEL_TYPE }}
      I_GOT_KEY: ${{ secrets.I_GOT_KEY }}
      QMSG_KEY: ${{ secrets.QMSG_KEY }}
      QMSG_QQ: ${{ secrets.QMSG_QQ }}
      QMSG_PUSH_TYPE: ${{ secrets.QMSG_PUSH_TYPE }}
      XI_ZHI_KEY: ${{ secrets.XI_ZHI_KEY }}
      PUSH_DEER_PUSH_KEY: ${{ secrets.PUSH_DEER_PUSH_KEY }}
      PUSH_DEER_ENDPOINT: ${{ secrets.PUSH_DEER_ENDPOINT }}
      PUSH_DEER_PUSH_TYPE: ${{ secrets.PUSH_DEER_PUSH_TYPE }}
      DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
      DISCORD_USERNAME: ${{ secrets.DISCORD_USERNAME }}
      TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
      TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
      TELEGRAM_SEND_SILENTLY: ${{ secrets.TELEGRAM_SEND_SILENTLY }}
      TELEGRAM_PROTECT_CONTENT: ${{ secrets.TELEGRAM_PROTECT_CONTENT }}
      TELEGRAM_MESSAGE_THREAD_ID: ${{ secrets.TELEGRAM_MESSAGE_THREAD_ID }}
      ONE_BOT_BASE_URL: ${{ secrets.ONE_BOT_BASE_URL }}
      ONE_BOT_ACCESS_TOKEN: ${{ secrets.ONE_BOT_ACCESS_TOKEN }}
      ONE_BOT_MSG_TYPE: ${{ secrets.ONE_BOT_MSG_TYPE }}
      ONE_BOT_RECIEVER_ID: ${{ secrets.ONE_BOT_RECIEVER_ID }}

参数

变量名 描述 可选值 默认值 必填
TYPE 通知类型 ServerChanTurbo, Dingtalk, CustomEmail, WechatRobot, WechatApp, PushPlus, IGot, Qmsg, XiZhi, PushDeer, Discord, Telegram, OneBot
TITLE 通知标题 任意字符串
DESP 通知内容 任意字符串
SCTKEY Server酱的SCKEY 字符串
ACCESS_TOKEN 推送服务的ACCESS_TOKEN 字符串
SECRET 推送服务的SECRET 字符串
WX_ROBOT_KEY 微信机器人的KEY 字符串
MSG_TYPE 微信机器人的消息类型 所有消息类型
EMAIL_TYPE 邮件通知类型 所有邮件类型
EMAIL_TO_ADDRESS 邮件接收地址 有效邮箱地址
EMAIL_AUTH_USER 邮件发送者邮箱 有效邮箱地址
EMAIL_AUTH_PASS 邮件发送者授权密码 字符串
EMAIL_HOST 邮件发送者邮箱服务器 有效域名
EMAIL_PORT 邮件发送者邮箱端口 数字
WX_APP_CORPID 企业微信的CORPID 字符串
WX_APP_AGENTID 企业微信的AGENTID 数字
WX_APP_SECRET 企业微信的SECRET 字符串
WX_APP_USERID 企业微信的USERID 字符串
PUSH_PLUS_TOKEN PUSH_PLUS的TOKEN 字符串
TEMPLATE_TYPE 钉钉机器人的模板类型 所有模板类型
CHANNEL_TYPE 钉钉机器人的通道类型 所有通道类型
I_GOT_KEY iGot的KEY 字符串
QMSG_KEY Qmsg的KEY 字符串
QMSG_QQ Qmsg的QQ 字符串
QMSG_PUSH_TYPE Qmsg的推送类型 所有推送类型
XI_ZHI_KEY 喜知的KEY 字符串
PUSH_DEER_PUSH_KEY PushDeer的PUSH_KEY 字符串
PUSH_DEER_ENDPOINT PushDeer的ENDPOINT 字符串
PUSH_DEER_PUSH_TYPE PushDeer的推送类型 所有推送类型
DISCORD_WEBHOOK Discord的WEBHOOK 字符串
DISCORD_USERNAME Discord的用户名 字符串
TELEGRAM_BOT_TOKEN Telegram的BOT_TOKEN 字符串
TELEGRAM_CHAT_ID Telegram的CHAT_ID 数字
TELEGRAM_SEND_SILENTLY Telegram的是否静默发送 true或false false
TELEGRAM_PROTECT_CONTENT Telegram的是否保护内容 true或false false
TELEGRAM_MESSAGE_THREAD_ID Telegram的消息线程ID 字符串
ONE_BOT_BASE_URL OneBot的BASE_URL 字符串
ONE_BOT_ACCESS_TOKEN OneBot的ACCESS_TOKEN 字符串
ONE_BOT_MSG_TYPE OneBot的消息类型 所有消息类型
ONE_BOT_RECIEVER_ID OneBot的接收者ID 数字