Skip to content

xhnmt/pushplus-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

PUSHPLUS微信推送 GitHub Action

使用方法

  1. 将 token 添加到仓库的 Actions secrets 中,命名为 token

  1. 在 workflow 中使用,例子如下:
- uses: josStorer/[email protected]
  id: current-time
  with:
    format: YYYYMMDD-HH
    utcOffset: "+08:00"
- uses: xhnmt/[email protected]
  with:
    token: ${{ secrets.token }}
    title: "PUSHPLUS推送 ${{ steps.current-time.outputs.formattedTime }}"
    content: "不能为空。默认HTML模板"

一个完整的例子:

在仓库根目录新建 .github/workflows/test.yml,内容如下:

name: 'build-test'
on:
  push:
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - name: PUSHPLUS推送通知
        uses: xhnmt/[email protected]
        with:
          token: ${{ secrets.token }}
          title: "我是一个小测试😝"
          content: "我是一个小测试😝"