Skip to content

twoot on a schedule #7121

twoot on a schedule

twoot on a schedule #7121

Workflow file for this run

name: twoot on a schedule
on:
workflow_dispatch:
schedule:
- cron: "12 2,5,8,11,14,17,20,23 * * *"
jobs:
scheduled:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2
with:
# disjoint branch with "unused concept" data
ref: "data"
path: "data_repo"
- uses: actions/setup-node@v2
with:
node-version: "16.9.1"
cache: "yarn"
- run: yarn install --frozen-lockfile
- run: yarn build
- run: yarn start
env:
DATA_DIR: "data_repo"
MASTODON_TOKEN: ${{ secrets.MASTODON_TOKEN }}
TWITTER_API_KEY: ${{ secrets.TWITTER_API_KEY }}
TWITTER_API_SECRET: ${{ secrets.TWITTER_API_SECRET }}
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
TWITTER_ACCESS_SECRET: ${{ secrets.TWITTER_ACCESS_SECRET }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
- name: Commit and push if changed
run: |-
cd data_repo
git config user.name "Automated"
git config user.email "[email protected]"
git add -A
timestamp=$(date -u)
git commit -m "Latest data: ${timestamp}" || exit 0
git push