Skip to content

Commit 944915d

Browse files
committed
Add github action to sync kernel-mainline
This github action will sync the kernel-mainline branch with Linus' tree every day at 8am LE-2708
1 parent 2515a93 commit 944915d

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

.github/workflows/sync.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Kernel Sync
2+
3+
on:
4+
schedule:
5+
- cron: "0 8 * * *"
6+
workflow_dispatch:
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
container:
12+
image: rockylinux:9
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
include:
17+
- branch: kernel-mainline
18+
remote: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
19+
remote_branch: master
20+
21+
env:
22+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23+
BRANCH: ${{ matrix.branch }}
24+
REMOTE: ${{ matrix.remote }}
25+
REMOTE_BRANCH: ${{ matrix.remote_branch }}
26+
27+
steps:
28+
- name: Install git
29+
run: |
30+
dnf install -y git
31+
32+
- name: Check out repository
33+
uses: actions/checkout@v4
34+
with:
35+
ref: ${{ env.BRANCH }}
36+
path: ${{ env.BRANCH }}
37+
38+
- name: Sync kernel source
39+
working-directory: ./${{ env.BRANCH }}
40+
run: |
41+
set -e
42+
43+
git config user.name "github-actions[bot]"
44+
git config user.email "github-actions[bot]@users.noreply.github.com"
45+
46+
git remote add upstream ${REMOTE}
47+
git fetch upstream --tags --quiet
48+
git rebase upstream/${REMOTE_BRANCH}
49+
git push origin --follow-tags
50+
51+

0 commit comments

Comments
 (0)