Skip to content

twoot on a schedule #9389

twoot on a schedule

twoot on a schedule #9389

Workflow file for this run

name: twoot on a schedule
on:
workflow_dispatch:
schedule:
- cron: "17 0,3,6,9,12,15,18,21 * * *"
jobs:
scheduled:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
with:
# disjoint branch with "unused concept" data
ref: "persist"
path: "persist"
- uses: pnpm/action-setup@ac5bf11548bf5e19b8aadb8182072616590fa4a6
with:
run_install: false
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # 4.1.0
with:
node-version-file: ".node-version"
cache: "pnpm"
- run: pnpm install --frozen-lockfile
- run: pnpm build
- run: pnpm start
env:
DATA_DIR: "persist"
MASTODON_TOKEN: ${{ secrets.MASTODON_TOKEN }}
BSKY_USERNAME: ${{ secrets.BSKY_USERNAME }}
BSKY_PASSWORD: ${{ secrets.BSKY_PASSWORD }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
- name: Commit and push if changed
run: |-
cd persist
git config user.name "Automated"
git config user.email "actions@users.noreply.github.com"
git add -A
timestamp=$(date -u)
git commit -m "Latest data: ${timestamp}" || exit 0
git push