-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1216 from utelecon/202410-rss-to-twitter
implement rss-to-twitter workflow
- Loading branch information
Showing
2 changed files
with
38 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: rss-to-twitter | ||
|
||
on: | ||
schedule: | ||
# everyday at 01:00 UTC (10:00 JST) | ||
- cron: '0 1 * * *' | ||
|
||
jobs: | ||
twitter: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: azu/rss-to-twitter@v2 | ||
with: | ||
# RSS feed URL | ||
RSS_URL: "https://utelecon.adm.u-tokyo.ac.jp/notice/rss.xml" | ||
# UPDATE_WITHIN_MINUTES is calculated from cron schedule to be 1 day | ||
TWEET_TEMPLATE: '%title% %url%' | ||
TWITTER_APIKEY: ${{ secrets.TWITTER_APIKEY }} | ||
TWITTER_APIKEY_SECRET: ${{ secrets.TWITTER_APIKEY_SECRET }} | ||
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }} | ||
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }} | ||
twitter-en: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: azu/rss-to-twitter@v2 | ||
with: | ||
# RSS feed URL | ||
RSS_URL: "https://utelecon.adm.u-tokyo.ac.jp/en/notice/rss.xml" | ||
# UPDATE_WITHIN_MINUTES is calculated from cron schedule to be 1 day | ||
TWEET_TEMPLATE: '%title% %url%' | ||
TWITTER_APIKEY: ${{ secrets.TWITTER_EN_APIKEY }} | ||
TWITTER_APIKEY_SECRET: ${{ secrets.TWITTER_EN_APIKEY_SECRET }} | ||
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_EN_ACCESS_TOKEN }} | ||
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_EN_ACCESS_TOKEN_SECRET }} |
This file contains 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