Mastodon Post plugin
Woodpecker plugin to post statuses to Mastodon.
Usage
image: woodpeckerci/plugin-mastodon-post
settings:
server_url: https://mastodon.social
access_token:
from_secret: your_access_token
status: We just released {{ CI_COMMIT_TAG }} ๐
Settings
Setting | Description | Required? | Default |
---|---|---|---|
server_url |
Mastodon server url, including protocol. | Yes | |
access_token |
Mastodon access token. (How to get Token) | Yes | |
status |
Status message (Allows Templating) | Yes (if ai_token is not set) |
|
sensitive |
Mark post as sensitive (true ) |
No | false |
media |
, -separated list of paths to attachments |
No | |
in_reply_to_id |
ID of post to reply to | No | |
spoiler_text |
Spoiler text | No | |
visibility |
Visibility (private , unlisted , public or direct ) |
No | null |
language |
Status language | No | |
ai_token |
Provide an AI token (OpenAI) to generate a status message | Yes (if status is not set) |
|
ai_model |
Select the model used to generate a status message | No | gpt-3.5-turbo |
ai_prompt |
Prompt used to generate a status message. (Allows Templating) | No | prompt |
changelog_file |
File to use for the AI to make a changelog from. | No | CHANGELOG.md |
Get Access Token
In order to get an access token, open your Settings and go to the Development
section. There create a new application and make sure that write:statuses
is checked (Also requires write:media
when using the media
setting).
After creating your application, copy the text next to Your access token
and use that as your access_token
value.
Templating
You can use {{ CI_COMMIT_TAG }}
and other environment variables in the status
or ai_prompt
settings.
The ai_prompt
template can also use {{ CHANGELOG }}
to include the changelog of the release.