Skip to content

A simple GitHub Workflow to send a notification to the BlueSky social media platform

License

Notifications You must be signed in to change notification settings

mod-posh/Post2BlueSky

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

BlueSky Notification GitHub Action

Overview

The "Post2Bluesky" Github Action posts a message to your Bsky social account. You can use this for project update notifications, new releases, or just an easy way to post a message. The workflow accepts a plain-text message or a JSON string comprised of at least bsky record.

Setup

GitHub Secrets: Set up the following secrets in your GitHub repository:

  • bluesky_api_key: Your BlueSky App Password.
  • bluesky_identifier: Your BlueSky Identifier, like user.bsky.social.

Workflow File

You can trigger the action.yml by workflow_call to post a notification automatically. The workflow contains several steps to act:

  1. Checkout the repository
  2. Call the post2bsky.ps1 script

Workflow Inputs

  • Message: The message to post, for links use github markdown
  • verbose: A value of verbose will output additional information
  • bluesky_api_key: Your BlueSky App Password
  • bluesky_identifier: Your BlueSky Identifier, something like user.bsky.social

PowerShell Script (issue2releasenotes.ps1)

The PowerShell script constructs an authentication package to authenticate into the API. Once it has authenticated, it checks to see if the Message is a proper bsky record with repo or if it's a plain-text message. If it's a proper message it is posted; if it's missing a repo, one is constructed, and then the message is posted; and finally, if it's just a plain-text message, a record and repo are created and posted for you.

Usage

There a few different ways you could use this action, here is an example of one way to get you started.

jobs:
  send_notification:
    uses: mod-posh/[email protected]
    with:
      message: '"This is a test post with a link to [github](https://www.github.com)"'
      verbose: 'verbose'
      bluesky_api_key: ${{ secrets.bluesky_api_key }}
      bluesky_identifier: ${{ secrets.bluesky_identifier }}

Note

This example is used directly as part of a larger workflow The verbose option will output a little more detail in the logs

License

This project is licensed using the Gnu GPL-3.

About

A simple GitHub Workflow to send a notification to the BlueSky social media platform

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published