Skip to content

Sync Affine Blocksuite #22

Sync Affine Blocksuite

Sync Affine Blocksuite #22

name: Sync Affine Blocksuite
on:
schedule:
- cron: '0 0 * * 1'
workflow_dispatch:
jobs:
sync:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout blocksuite Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install git-filter-repo
run: |
sudo apt update
sudo apt install -y python3-pip
pip install git-filter-repo
- name: Clone affine Repository and Extract blocksuite
run: |
git clone --depth=1 https://github.com/toeverything/affine.git affine_repo
cd affine_repo
git filter-repo --subdirectory-filter blocksuite
cd ..
- name: Copy blocksuite to packages/
run: |
rsync -av --delete --exclude '.git' affine_repo/ packages/
rm -rf affine_repo
- name: Install dependencies
run: |
yarn install --no-frozen-lockfile
- name: Commit and Push Changes
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "chore: sync affine blocksuite to packages on $(date)" || exit 0
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.BS_SYNC_TOKEN }}
commit-message: 'chore: sync affine blocksuite to packages on $(date)'
branch: sync-affine-blocksuite
delete-branch: true
title: 'chore: sync affine blocksuite to packages'
body: 'This PR was created automatically by GitHub Actions to sync affine/blocksuite to blocksuite/packages.'
base: main