Created
May 31, 2026 02:58
-
-
Save sulrich/0f0c80f0844ca39b906fca98cc5f9ceb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: POSSE | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "content/posts/**" | |
| - "content/til/**" | |
| - "content/links/**" | |
| - "bin/posse.py" | |
| - ".github/workflows/posse.yml" | |
| workflow_dispatch: | |
| inputs: | |
| dry_run: | |
| description: "dry run (do not post or write state)" | |
| type: boolean | |
| default: false | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: posse | |
| cancel-in-progress: false | |
| jobs: | |
| syndicate: | |
| runs-on: ubuntu-latest | |
| environment: posse-posting | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v4 | |
| - name: wait for cloud build + cloudflare to propagate | |
| if: ${{ github.event_name == 'push' }} | |
| run: sleep 120 | |
| - name: install uv | |
| uses: astral-sh/setup-uv@v3 | |
| - name: syndicate | |
| run: | | |
| if [ "${{ inputs.dry_run }}" = "true" ]; then | |
| uv run bin/posse.py --dry-run | |
| else | |
| uv run bin/posse.py | |
| fi | |
| env: | |
| MASTODON_INSTANCE_URL: ${{ vars.MASTODON_INSTANCE_URL }} | |
| MASTODON_ACCESS_TOKEN: ${{ secrets.MASTODON_ACCESS_TOKEN }} | |
| BLUESKY_HANDLE: ${{ vars.BLUESKY_HANDLE }} | |
| BLUESKY_APP_PASSWORD: ${{ secrets.BLUESKY_APP_PASSWORD }} | |
| - name: commit state if changed | |
| if: ${{ inputs.dry_run != 'true' }} | |
| run: | | |
| if ! git diff --quiet -- data/syndicated.json; then | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add data/syndicated.json | |
| git commit -m "posse: update syndication state [skip ci]" | |
| git push | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment