Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
edit

GitHub Action

Send Bluesky Post

v4

Send Bluesky Post

edit

Send Bluesky Post

Provide an easy way to post to Bluesky Social from Github Actions

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Send Bluesky Post

uses: myConsciousness/bluesky-post@v4

Learn more about this action in myConsciousness/bluesky-post

Choose a version

GitHub Sponsor GitHub Sponsor

Powered by atproto Powered by bluesky Powered by bluesky_text

Send a Post to Bluesky from GitHub Actions Workflow

Use this action to send a post from GitHub actions workflow.

This action is implemented in the Dart language and uses bluesky for posting to Bluesky Social.

Workflow Usage

Configure your workflow to use myConsciousness/bluesky-post@v4, and provide the post you want to send as the text input.

Provide Bluesky's ATP server with identifier (handle or email) and password to create a session.

For example:

name: Send Bluesky Post

on:
    [push]

jobs:
  post:
    runs-on: ubuntu-latest
    steps:
      - uses: myConsciousness/bluesky-post@v4
        with:
          text: "Hello, Bluesky!"
          identifier: ${{ secrets.BLUESKY_IDENTIFIER }}
          password: ${{ secrets.BLUESKY_PASSWORD }}

Now whenever you push something to your repository, GitHub Actions will post to Bluesky on your behalf.

Note
In the Bluesky API, the mention and link functions will not work unless the facet parameter is set correctly when the request is sent, but this Action will automatically extract valid handle and link from the text and set the facet.

Specify Authority

Bluesky Social is a distributed microservice. So you may possibly want to post to a ATP server other than bsky.social.

In that case, set the service parameter to the authority you wish to post as follows. If the service parameter is omitted, the default is bsky.social.

name: Send Bluesky Post

on:
    [push]

jobs:
  post:
    runs-on: ubuntu-latest
    steps:
      - uses: myConsciousness/bluesky-post@v4
        with:
          text: "Hello, Bluesky!"
          identifier: ${{ secrets.BLUESKY_IDENTIFIER }}
          password: ${{ secrets.BLUESKY_PASSWORD }}
          service: "boobee.blue"

Retry

Server error or network errors may temporarily occur during API communication to the ATP server. In such cases, retrying at regular intervals may result in successful processing.

This Actions supports Retry, and you can specify the maximum number of retries. The default retry count is 5.

You can specify the following.

name: Send Bluesky Post

on:
    [push]

jobs:
  post:
    runs-on: ubuntu-latest
    steps:
      - uses: myConsciousness/bluesky-post@v4
        with:
          text: "Hello, Bluesky!"
          identifier: ${{ secrets.BLUESKY_IDENTIFIER }}
          password: ${{ secrets.BLUESKY_PASSWORD }}
          retry-count: 5

Attach Media

You can also post a text with an image of a specified file path attached.

name: Send Bluesky Post

on:
    [push]

jobs:
  post:
    runs-on: ubuntu-latest
    steps:
      # You must checkout resources
      - uses: actions/checkout@v4

      - uses: myConsciousness/bluesky-post@v4
        with:
          text: "Hello, Bluesky!"
          media: cool_photo.png
          media-alt: "This is a cool photo!"
          identifier: ${{ secrets.BLUESKY_IDENTIFIER }}
          password: ${{ secrets.BLUESKY_PASSWORD }}

Attach Language Tags

You can give the post you are sending BCP47 format language tags. One or more language tags can be set and passed to the langs parameter in CSV format as follows.

name: Send Bluesky Post

on:
    [push]

jobs:
  post:
    runs-on: ubuntu-latest
    steps:
      # You must checkout resources
      - uses: actions/checkout@v4

      - uses: myConsciousness/bluesky-post@v4
        with:
          text: "Hello, Bluesky!"
          langs: "en,ja"
          identifier: ${{ secrets.BLUESKY_IDENTIFIER }}
          password: ${{ secrets.BLUESKY_PASSWORD }}

Attach Self Labels

You can label any post you send. You can set one or more labels, and pass the value of any label in the labels parameter in CSV format as follows.

name: Send Bluesky Post

on:
    [push]

jobs:
  post:
    runs-on: ubuntu-latest
    steps:
      # You must checkout resources
      - uses: actions/checkout@v4

      - uses: myConsciousness/bluesky-post@v4
        with:
          text: "Hello, Bluesky!"
          labels: "fun,sports"
          identifier: ${{ secrets.BLUESKY_IDENTIFIER }}
          password: ${{ secrets.BLUESKY_PASSWORD }}

More Information

bluesky_post was designed and implemented by Shinya Kato (@myConsciousness).