Skip to content

Conversation

flexiondotorg
Copy link
Owner

🔄 Automated Upstream Synchronisation

This PR adds a robust GitHub Actions workflow to automatically keep this fork in sync with the upstream TypingMind repository.

✨ Features

  • Scheduled daily sync at 2 AM UTC (perfect for UK timezone)
  • Manual trigger with optional dry-run mode for testing
  • Smart pre-flight checks - only syncs when needed
  • Comprehensive error handling and verification
  • Official GitHub CLI (gh) for maximum reliability
  • Clear logging so you know exactly what happened

🚀 How it works

  1. Daily check: Compares fork with upstream to see if sync is needed
  2. Conditional sync: Only runs if there are new commits upstream
  3. Verification: Confirms sync completed successfully
  4. CloudFlare integration: Will trigger your CloudFlare Pages deployment when upstream changes are pulled in

🎛️ Manual Control

You can manually trigger the workflow from the Actions tab with:

  • Standard sync: Pulls latest changes from upstream
  • Dry-run mode: Shows what would be synced without making changes

🔒 Security

  • Uses official GitHub tooling (gh CLI)
  • No third-party actions or dependencies
  • Leverages built-in GITHUB_TOKEN authentication
  • Minimal attack surface

This approach is production-ready and aligns with enterprise-grade automation practices. Once merged, your fork will stay automatically in sync with upstream TypingMind releases! 🎉

This workflow automatically syncs the fork with the upstream TypingMind repository:

- Runs daily at 2 AM UTC
- Can be triggered manually with optional dry-run mode
- Uses GitHub CLI (`gh`) for maximum reliability and official support
- Includes pre-flight checks to avoid unnecessary syncs
- Provides comprehensive logging and error handling
- Verifies sync completion

The workflow will trigger CloudFlare Pages deployments only when there are actual upstream changes.
Copy link

cloudflare-workers-and-pages bot commented Aug 18, 2025

Deploying typingmind with  Cloudflare Pages  Cloudflare Pages

Latest commit: eae6fa6
Status: ✅  Deploy successful!
Preview URL: https://959e7cca.typingmind-47x.pages.dev
Branch Preview URL: https://add-upstream-sync-workflow.typingmind-47x.pages.dev

View logs

Enhanced the workflow_dispatch to provide clearer manual trigger options:

- **sync**: Standard sync (only if upstream has new commits) - DEFAULT  
- **dry-run**: Show what would be synced without making changes
- **force-sync**: Sync regardless of upstream status (useful for troubleshooting)

This makes manual triggering more intuitive with a dropdown menu in the GitHub Actions UI, giving you full control over the sync process.
@flexiondotorg flexiondotorg requested a review from Copilot August 18, 2025 23:32
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@flexiondotorg flexiondotorg merged commit 17657ec into main Aug 20, 2025
1 check passed
@flexiondotorg flexiondotorg deleted the add-upstream-sync-workflow branch August 20, 2025 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant