Skip to content

Sync Fork

Sync Fork #152

Workflow file for this run

name: Sync Fork
on:
schedule:
- cron: '0 */3 * * *'
workflow_dispatch:
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Check repository
id: check_repo
run: |
if [[ "${{ github.repository }}" != "imbhargav5/nextbase-ultimate" ]]; then
echo "Workflow can only run on imbhargav5/nextbase-ultimate"
echo "SHOULD_CONTINUE=false" >> $GITHUB_ENV
else
echo "SHOULD_CONTINUE=true" >> $GITHUB_ENV
fi
- name: Checkout
if: env.SHOULD_CONTINUE == 'true'
uses: actions/checkout@v4
- name: Sync fork
if: env.SHOULD_CONTINUE == 'true'
uses: repo-sync/github-sync@v2
with:
source_repo: 'https://${{secrets.NEXTBASE_SYNC_REPO_SECRET}}@github.com/usenextbase/nextbase-ultimate.git'
source_branch: 'main'
destination_branch: 'main'
github_token: ${{ secrets.NEXTBASE_SYNC_REPO_SECRET }}