https://github.com/cbrgm/bluesky-github-action
Send posts to Bluesky Social from GitHub Actions
https://github.com/cbrgm/bluesky-github-action
bluesky bluesky-app github github-actions post status
Last synced: 11 months ago
JSON representation
Send posts to Bluesky Social from GitHub Actions
- Host: GitHub
- URL: https://github.com/cbrgm/bluesky-github-action
- Owner: cbrgm
- License: apache-2.0
- Created: 2024-04-04T18:05:00.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-04T16:06:49.000Z (11 months ago)
- Last Synced: 2025-03-10T19:16:31.919Z (11 months ago)
- Topics: bluesky, bluesky-app, github, github-actions, post, status
- Language: Go
- Homepage: https://bsky.social
- Size: 45.9 KB
- Stars: 15
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# Bluesky Send GitHub Action

**Use this action to send a post from a GitHub Actions workflow to Bluesky.**
[](https://github.com/cbrgm/bluesky-github-action)
[](https://goreportcard.com/report/github.com/cbrgm/bluesky-github-action)
[](https://github.com/cbrgm/bluesky-github-action/actions/workflows/go-lint-test.yml)
[](https://github.com/cbrgm/bluesky-github-action/actions/workflows/go-binaries.yml)
[](https://github.com/cbrgm/bluesky-github-action/actions/workflows/container.yml)
## 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](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:
```yaml
- 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:
```yaml
- 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
```mermaid
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](https://github.com/cbrgm/bluesky-github-action/blob/main/CONTRIBUTING.md) 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](https://github.com/cbrgm/bluesky-github-action/blob/main/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 🌍.