Skip to content

Sync

Sync #847

Workflow file for this run

name: Sync
on:
push:
branches: [ "main" ]
schedule:
# https://crontab.guru/#0_*/6_*_*_*
- cron: '0 */6 * * *'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- run: pnpm run --if-present build
- name: Synchronize
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
pnpm run sync
pnpm run diff
if ! git diff -I'^[+-]{3} ' --exit-code --quiet; then
pnpm test
git add .
git commit -m '🤖 Sync types'
git push
else
echo repository is up to date
fi