- Python 74.1%
- Makefile 20.6%
- Dockerfile 5.3%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .forgejo | ||
| src/bluesky_post_action | ||
| tests | ||
| .coveragerc.toml | ||
| .dockerignore | ||
| .editorconfig | ||
| .env.example | ||
| .gitignore | ||
| .hadolint.yaml | ||
| .prettierignore | ||
| .python-version | ||
| action.yml | ||
| AGENTS.md | ||
| CLAUDE.md | ||
| Dockerfile | ||
| LICENSE | ||
| Makefile | ||
| pyproject.toml | ||
| pytest.toml | ||
| README.md | ||
| ruff.toml | ||
| ty.toml | ||
| uv.lock | ||
Bluesky Post
Forgejo Action that posts a message to Bluesky over the AT Protocol. Links written inline as |label|url| become
clickable text in the published post.
Usage
name: Announce
on:
push:
branches: [main]
jobs:
post:
runs-on: docker
steps:
- name: Post to Bluesky
uses: https://code.modernleft.org/ModernLeft/bluesky-post-action@main
with:
handle: ${{ secrets.BLUESKY_HANDLE }}
app-password: ${{ secrets.BLUESKY_APP_PASSWORD }}
pds-host: https://bsky.social
message: >-
New commit on |bluesky-post-action|https://code.modernleft.org/ModernLeft/bluesky-post-action| ${{
github.sha }}
The action runs as a Docker container, so the job needs a runner that can build and run container actions. The container
installs the published bluesky-post-action wheel from this repository's releases and runs it as its entrypoint.
| Input | Required | Default | Description |
|---|---|---|---|
handle |
yes | Bluesky handle of the posting account. | |
app-password |
yes | App password for the account (use a repo secret, not your main password). | |
message |
yes | Post text. Write a link as |label|url| and it becomes a clickable label. |
|
pds-host |
no | https://bsky.social |
Base URL of the PDS. Defaults to the main Bluesky PDS. |
Every |label|url| in the message becomes a link whose visible text is the label. Neither the label nor the URL may
contain |, and both must be non-empty. Text outside the markers is posted as plain text with no other formatting, so a
bare URL stays unlinked. The label counts toward the post length, the URL does not.
Bluesky enforces a 300 grapheme limit per post. The action does not check length before sending, so an oversized message is rejected by the server and the step fails.
Setup
- Create an app password for the posting account in its Bluesky settings.
- Add
BLUESKY_HANDLEandBLUESKY_APP_PASSWORDas repository secrets. AddBLUESKY_PDS_HOSTas well if the account lives on a self-hosted PDS, and pass it topds-host; otherwise omitpds-hostto usehttps://bsky.social. - Reference the action as in the snippet above.
On success the action prints the new post's at:// URI and CID to the job log. It declares no outputs, so later steps
cannot read them. If the PDS rejects the credentials, the error is printed and the step exits with status 1. If the PDS
rejects the post, for example because it is over the grapheme limit, the error is printed and the step exits with status
1 in the same way. Any other failure, such as an unreachable PDS, surfaces as an uncaught exception and also fails the
step.