forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (29 loc) · 904 Bytes
/
git-sync.yml
File metadata and controls
35 lines (29 loc) · 904 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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