forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (56 loc) · 1.72 KB
/
sync-repo.yml
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: SYNC REPO
on:
push:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
permissions:
# Give the default GITHUB_TOKEN write permission.
# https://github.blog/changelog/2023-02-02-github-actions-updating-the-default-github_token-permissions-to-read-only/
contents: write
steps:
- uses: actions/checkout@v4
with:
ref: mm-unstable
path: linux
- name: add-remote
run: |
cd linux
git remote add kernel git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
git remote -v
git ls-remote kernel
- name: pull-push-mm-unstable
run: |
cd linux
git checkout -b mm-unstable-local kernel mm-unstable
git push -f origin mm-unstable-local:mm-unstable
- uses: actions/checkout@v4
with:
ref: mm-stable
path: linux
- name: pull-push-mm-stable
run: |
cd linux
git checkout -b mm-stable-local kernel/mm-stable
git push -f origin mm-stable-local:mm-stable
- uses: actions/checkout@v4
with:
ref: master
path: linux
- name: pull-master
run: |
cp linux/.github/workflows/sync-repo.yml .
cd linux
git checkout -b master-local kernel/master
- uses: actions/checkout@v4
with:
ref: master-local
path: linux
- name: pull-push-master
run: |
mkdir -p .github/workflows
cp ../sync-repo.yml .github/workflows/sync-repo.yml
git add .github/workflows/sync-repo.yml
git commit -m "[AUTO-COMMIT] AUTO SYNC KERNEL REPO" .github/workflows/sync-repo.yml
git push -f origin master-local:master