websegura/.github/workflows/twitter.yml

37 lines
865 B
YAML
Raw Normal View History

2021-03-06 15:06:44 +01:00
name: twitter
2021-03-06 15:05:56 +01:00
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:
2021-03-07 21:01:31 +01:00
TWITTER_BEARER_TOKEN: ${{ secrets.TWITTER_BEARER_TOKEN }}
2021-03-06 15:05:56 +01:00
run: npm run twitter:search
2021-03-07 21:01:31 +01:00
- 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