Sync Fork #1278
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |