Repository navigation
Sync Development #251
This file contains hidden or 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 Development | |
| on: | |
| schedule: | |
| # Daily at 22:30 IST ≈ 17:00 UTC (adjust to your preferred time) | |
| - cron: '0 17 * * *' | |
| workflow_dispatch: # ✅ Manual trigger button | |
| permissions: | |
| contents: write | |
| jobs: | |
| sync: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # step 1: checkout (default branch) | |
| - name: Checkout development branch | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: development | |
| fetch-depth: 0 # non-shallow for clean merges | |
| - name: Configure Git | |
| run: | | |
| git config user.name "github-actions" | |
| git config user.email "github-actions@github.com" | |
| - name: Add upstream remote | |
| run: | | |
| git remote add upstream https://github.com/torvalds/linux.git || true | |
| git checkout master | |
| git fetch upstream | |
| git reset --hard upstream/master | |
| git push origin master |