Hourly Check RSS and send notify #6618
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
name: Hourly Check RSS and send notify | |
on: | |
schedule: | |
- cron: "0 */1 * * *" | |
workflow_dispatch: | |
jobs: | |
sendNotify: | |
name: Send RSS Message to Tailchat | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- name: Use Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 16.13.1 | |
- name: Cache pnpm modules | |
uses: actions/cache@v2 | |
with: | |
path: ~/.pnpm-store | |
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}- | |
- uses: pnpm/action-setup@v2.0.1 | |
with: | |
version: 6.24.2 | |
run_install: true | |
- name: Checkout db | |
uses: moonrailgun/branch-filestorage-action@v1.2.2 | |
with: | |
path: db/posts.json | |
- name: Run RSS Script | |
run: pnpm start | |
env: | |
RSS_URL: ${{ secrets.RSS_URL }} | |
TC_NOTIFY_URL: ${{ secrets.TC_NOTIFY_URL }} |