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
- If you didn't before register to an instance of mastodon network:
- example: https://mastodon.social
- Once registered, go to settings page to create an application:
- Go to "Settings" / "Development" / "New Application"
- Fill application name: mastodon-lite (or anything else), ignore other fields
- Submit to generate application
- Go to application details and note "access token"
- example: "B4DC0D-DeadBeef1BadCode-1TODO
1TODOtodoTODO"
- example: "B4DC0D-DeadBeef1BadCode-1TODO
Add secret to github
- From your project page:
- Add new secret with name "MASTODON
ACCESSTOKEN" and the previous encoded string as value.
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 pushThen 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:
- https://github.com/marketplace/actions/fediverse-action/
- https://github.com/rzr/mastodon-lite/
- https://help.github.com/en/actions/building-actions/creating-a-javascript-action
- https://github.com/rzr/webthing-iotjs/wiki/Social
- https://en.wikipedia.org/wiki/Fediverse
- https://github.com/features/actions
- https://www.npmjs.com/package/fediverse-action
- https://github.community/t5/GitHub-Actions/bd-p/actions
- https://lab.github.com/githubtraining/github-actions:-continuous-delivery
- https://mastodon.social/@rzr/103772277257320621#fediverse-action
- https://github.com/rzr/mastodon-lite/blob/master/.github/workflows/fediverse-action.yml
- https://mastodon.social/@rzr/103772576183594794#mastodon-lite
