websegura/.github/workflows/twitter.yml
2021-03-07 21:01:31 +01:00

37 lines
865 B
YAML

name: twitter
on:
schedule:
- cron: "0 4 * * *"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "14"
- name: Install dependencies
run: npm ci
- name: Request Twitter stats
env:
TWITTER_BEARER_TOKEN: ${{ secrets.TWITTER_BEARER_TOKEN }}
run: npm run twitter:search
- name: Update Twitter summary
run: npm run twitter:summary
# The resulting commit will not trigger another GitHub Actions Workflow run.
# This is due to limitations set by GitHub.
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Update information about twitter results