-
Notifications
You must be signed in to change notification settings - Fork 22
44 lines (36 loc) · 1.27 KB
/
social-post.yml
File metadata and controls
44 lines (36 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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