Skip to content

funnyzak/pushoo-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

Pushoo Github Action

A GitHub Action with Pushoo.js pushes multiple platform messages.

You also can use Pushoo CLI to push messages on command line.

action license Sourcegraph GitHub repo size latest tag GitHub last commit

Usage

you can use this action in your workflow like this:

name: CI
on:
  push:
    branches:
      - main
    tags:
      - "*"
  pull_request:
    branches: [main]
  workflow_dispatch:
jobs:
  push-message:
    name: Push Message
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Push Message
        uses: funnyzak/pushoo-action@main
        with:
          platforms: ifttt,wecombot,bark,dingtalk
          tokens: ${{ secrets.PUSH_TOKEN }}
          content: |
            # ${{ github.event.repository.name }} ${{ github.event_name }} Message
            ## trigger: ${{ github.event_name }} at ${{ github.event.head_commit.timestamp }}
            ## commit message: ${{ github.event.head_commit.message }}
            ## commit url: ${{ github.event.head_commit.url }}
            ## commit author: ${{ github.event.head_commit.author.name }}
            ## commit email: ${{ github.event.head_commit.author.email }}
            ## commit id: ${{ github.event.head_commit.id }}
          title: |
            ${{ github.repository }} ${{ github.event_name }} Message
          options: '{"bark": { "url": "https://github.com/${{github.repository}}" }, "dingtalk": {"msgtype": "markdown"}}'
          debug: false

NOTE: You need to set the PUSH_TOKEN secret in your repository settings.

Inputs

Name Type Description
platforms List/CSV List of platforms mapping (e.g., dingtalk,wecom)
tokens List/CSV List of token (e.g., dingtalk_token_string,wecom_token_string)
content String The push content of the Markdown format. If the push platform does not support MarkDown, Pushoo will automatically convert to support formats.
title String Optional, message title, if the push platform does not support message title, it will be spliced in the first line of the text.
options String Optional, For some additional configuration when pushing, Json string.
debug Boolean Enable the debug flag to show detail log.

Contribution

If you have any ideas or opinions, please refer to Issue or PR.

License

MIT License © 2022 funnyzak