Skip to content

Commit d63120c

Browse files
authored
feat(workflows): add Throwback Thursday scheduled posts (#19)
1 parent 14c0f51 commit d63120c

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Throwback Thursday
2+
3+
on:
4+
schedule:
5+
# 10 AM Eastern on Thursdays: 15:00 UTC (EST) / 14:00 UTC (EDT)
6+
# Using 15:00 UTC = 10 AM EST, 11 AM EDT
7+
- cron: '0 15 * * 4'
8+
workflow_dispatch:
9+
inputs:
10+
exclude_days:
11+
description: 'Exclude posts newer than this many days (default: 30)'
12+
required: false
13+
type: number
14+
default: 30
15+
16+
jobs:
17+
select:
18+
uses: CodingWithCalvin/.github/.github/workflows/random-blog-post-from-rss.yml@main
19+
with:
20+
rss_url: 'https://www.codingwithcalvin.net/rss.xml'
21+
exclude_days: ${{ inputs.exclude_days || 30 }}
22+
23+
post-bluesky:
24+
needs: select
25+
if: needs.select.outputs.has_post == 'true'
26+
uses: CodingWithCalvin/.github/.github/workflows/bluesky-post.yml@main
27+
with:
28+
post_text: |
29+
Throwback! Originally posted ${{ needs.select.outputs.post_date }}
30+
31+
[${{ needs.select.outputs.post_title }}](${{ needs.select.outputs.post_url }})
32+
33+
${{ needs.select.outputs.post_hashtags }} #ThrowbackThursday
34+
embed_url: ${{ needs.select.outputs.post_url }}
35+
embed_title: ${{ needs.select.outputs.post_title }}
36+
embed_description: ${{ needs.select.outputs.post_description }}
37+
secrets:
38+
BLUESKY_USERNAME: ${{ secrets.BLUESKY_USERNAME }}
39+
BLUESKY_APP_PASSWORD: ${{ secrets.BLUESKY_APP_PASSWORD }}
40+
41+
post-linkedin:
42+
needs: select
43+
if: needs.select.outputs.has_post == 'true'
44+
uses: CodingWithCalvin/.github/.github/workflows/linkedin-post.yml@main
45+
with:
46+
post_text: |
47+
Throwback! Originally posted ${{ needs.select.outputs.post_date }}
48+
49+
${{ needs.select.outputs.post_title }}
50+
51+
${{ needs.select.outputs.post_hashtags }} #ThrowbackThursday
52+
article_url: ${{ needs.select.outputs.post_url }}
53+
article_title: ${{ needs.select.outputs.post_title }}
54+
article_description: ${{ needs.select.outputs.post_description }}
55+
secrets:
56+
LINKEDIN_ACCESS_TOKEN: ${{ secrets.LINKEDIN_ACCESS_TOKEN }}
57+
LINKEDIN_CLIENT_ID: ${{ secrets.LINKEDIN_CLIENT_ID }}

0 commit comments

Comments
 (0)