Giter Site home page Giter Site logo

cbrgm / bluesky-github-action Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 29 KB

Send posts to Bluesky Social from GitHub Actions

Home Page: https://bsky.social

License: Apache License 2.0

Makefile 31.18% Go 60.25% Nix 8.57%
bluesky bluesky-app github github-actions post status

bluesky-github-action's Introduction

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 ๐ŸŒ.

bluesky-github-action's People

Contributors

cbrgm avatar renovate[bot] avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.