Weekly Social Post #3
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: Weekly Social Post | |
| on: | |
| schedule: | |
| - cron: '0 14 * * 1' # Every Monday at 14:00 UTC (10 AM ET) | |
| workflow_dispatch: # Manual trigger | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: social-post | |
| cancel-in-progress: false | |
| jobs: | |
| post: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '25' | |
| - uses: jbangdev/setup-jbang@main | |
| - name: Post to Twitter | |
| env: | |
| TWITTER_CONSUMER_KEY: ${{ secrets.TWITTER_APP_CONSUMER_KEY }} | |
| TWITTER_CONSUMER_KEY_SECRET: ${{ secrets.TWITTER_APP_SECRET_KEY }} | |
| TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }} | |
| TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }} | |
| run: jbang html-generators/socialpost.java | |
| - name: Commit updated state | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add social/state.yaml social/queue.txt social/tweets.yaml | |
| git diff --cached --quiet && exit 0 | |
| git commit -m "chore: update social post state [skip ci]" | |
| git pull --rebase | |
| git push |