Skip to content

twoot on a schedule #9258

twoot on a schedule

twoot on a schedule #9258

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@v4
- uses: actions/checkout@v4
with:
# disjoint branch with "unused concept" data
ref: "data"
path: "data_repo"
- uses: pnpm/action-setup@18ac635edf3d6cd3e88d281bceecc25c4dbc1e73
with:
run_install: false
- uses: actions/setup-node@v4
with:
node-version-file: ".node-version"
cache: "pnpm"
- run: pnpm install --frozen-lockfile
- run: pnpm build
- run: pnpm start
env:
DATA_DIR: "data_repo"
NODE_ENV: "production"
MASTODON_TOKEN: ${{ secrets.MASTODON_TOKEN }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
BSKY_USERNAME: ${{ secrets.BSKY_USERNAME }}
BSKY_PASSWORD: ${{ secrets.BSKY_PASSWORD }}
- 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