Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
speaker

GitHub Action

fediverse-action

v0.0.5

fediverse-action

speaker

fediverse-action

Post to FediVerse from GitHub action, supports Mastodon ActivityPub

Installation

Copy and paste the following snippet into your .yml file.

              

- name: fediverse-action

uses: rzr/[email protected]

Learn more about this action in rzr/fediverse-action

Choose a version

Fediverse-Action Documentation:

About:

Post notification to fediverse social web when code is updated. Currently it was tested with Mastodon service, Support for other activity pub services like pleroma or GNUsocial is also welcome.

Usage:

Join fediverse

Add secret to github

Commit config file

Back to your project import config file:

mkdir -p .github/workflows/
file=".github/workflows/fediverse-action.yml"
curl -o "$file" \
  "https://raw.githubusercontent.com/rzr/fediverse-action/master/$file"
git add "$file"
git commit -sm 'github: Add fediverse-action' "$file"
git push

Then check action's status on github, a message should then appear on your fediverse profile, something like:

Customize yml

The default config file will post on each push, if you something less verbose you can filter on release only.

Note default "mastodon.social" server will be used unless you override a host value:

# YAML
---

name: fediverse-action
on: [push]
jobs:
  post:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - id: log
        run: echo "::set-output name=message::$(git log --no-merges -1 --oneline)"
      - if: "contains(steps.log.outputs.message, 'Release ')"
        uses: rzr/fediverse-action@master
        with:
          access-token: ${{ secrets.MASTODON_ACCESS_TOKEN }}
          message: "https://github.com/marketplace/actions/fediverse-action# #FediverseAction has just been triggered on my repo thx @[email protected]"

You can get inspired from this reference config file:

Feel free to also pin version to latest release (-"@master" +"@vX.Y.Z"):

Resources:

fediverse-action