JSPM

fediverse-action

0.0.4
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5
  • Score
    100M100P100Q27082F
  • License ISC

Post to fediverse from github

Package Exports

  • fediverse-action

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (fediverse-action) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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 @rzr@mastodon.social"

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