Skip to content

cbrgm/bluesky-github-action

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 Send GitHub Action

Use this action to send a post from a GitHub Actions workflow to Bluesky.

GitHub release Go Report Card go-lint-test go-binaries container

Inputs

  • handle: Required - Your Bluesky user handle for authentication. It's recommended to use secrets to protect your handle.

  • password: Required - Your password for authentication with Bluesky. It's recommended to use secrets to protect your password.

  • text: Required - The content of the post to be sent to Bluesky.

  • pds-url: Optional - The URL of the Bluesky PDS (Personal Data Server).

  • lang: Optional - A comma-separated list of ISO 639 language codes for the post. Helps in categorizing the post by language.

  • log-level: Optional - Specifies the logging level (debug, info, warn, error). Defaults to info.

Container Usage

This action can be executed independently from workflows within a container. To do so, use the following command:

podman run --rm -it ghcr.io/cbrgm/bluesky-github-action:v1 --help

Workflow Usage

First, ensure you have your Bluesky handle, and password. Set the following repository secrets:

  • BLUESKY_HANDLE - Your Bluesky handle. (Example: username.bsky.social)
  • BLUESKY_PASSWORD - Your password for authentication with Bluesky.

You can create a new App Password at https://bsky.app/settings/app-passwords.

Optional:

  • BLUESKY_PDS_URL - Your Bluesky PDS (Personal Data Server) URL, e.g., https://pds.blueskyweb.xyz (Defaults to https://blsky.social)

Use the following step in your GitHub Actions Workflow:

- name: Send post to Bluesky
  id: bluesky_post
  uses: cbrgm/bluesky-github-action@v1
  with:
    handle: ${{ secrets.BLUESKY_HANDLE }} # Your handle (example: username.bsky.social)
    password: ${{ secrets.BLUESKY_PASSWORD }} # Your password
    text: "Hello from GitHub Actions!" # The content of the post

Multiline post:

- name: Send multiline post to Bluesky
  id: bluesky_post_multiline
  uses: cbrgm/bluesky-github-action@v1
  with:
    handle: ${{ secrets.BLUESKY_HANDLE }} # Your handle (example: username.bsky.social)
    password: ${{ secrets.BLUESKY_PASSWORD }} # Your password
    text: |
      This is a multiline post sent from GitHub Actions.
      This example demonstrates how to include multiple lines in the `text` input.

High-Level Functionality

sequenceDiagram
    participant GA as GitHub Actions
    participant GHA as Bluesky GitHub Action
    participant BP as Bluesky PDS

    GA->>GHA: Starts Bluesky GitHub Action
    GHA->>BP: Sends authentication request
    BP-->>GHA: Returns session token
    GHA->>BP: Submits post using session token
    BP-->>GHA: Confirms post submission
    GHA->>GA: Action completes, returns result

Contributing & License

  • Contributions Welcome!: Interested in improving or adding features? Check our Contributing Guide for instructions on submitting changes and setting up development environment.
  • Open-Source & Free: Developed in my spare time, available for free under Apache 2.0 License. License details your rights and obligations.
  • Your Involvement Matters: Code contributions, suggestions, feedback crucial for improvement and success. Let's maintain it as a useful resource for all 🌍.