Skip to content

Commit 259254e

Browse files
authored
Create kbuild.yml
0 parents  commit 259254e

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/kbuild.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Clone Custom Kernel and Push
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
clone:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v3
18+
19+
- name: Install Dependencies
20+
run: |
21+
sudo apt-get update
22+
sudo apt-get install -y git
23+
24+
- name: Clone Linux Kernel Source
25+
run: |
26+
# Clone the kernel source into the root directory if it doesn't already exist
27+
if [ ! -d "linux" ]; then
28+
git clone https://github.com/torvalds/linux.git
29+
cd linux
30+
git checkout v6.12 # Replace with the latest stable version tag or keep it up to date
31+
fi
32+
33+
- name: Commit and Push Kernel to Repository
34+
run: |
35+
# Commit the cloned kernel source and push it back to the repository
36+
cd linux
37+
git add .
38+
git commit -m "Add Linux kernel source"
39+
git push origin main
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)