Skip to content

Commit 08a1a24

Browse files
authored
Create main.yml
1 parent 6ac7abb commit 08a1a24

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/main.yml

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Build WSL2 Kernel
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Checkout repository
12+
uses: actions/checkout@v4
13+
with:
14+
fetch-depth: 1
15+
16+
- name: Install dependencies
17+
run: |
18+
sudo apt update
19+
sudo apt install -y build-essential flex bison dwarves libssl-dev libelf-dev cpio qemu-utils zstd xz-utils
20+
21+
- name: Build Kernel
22+
run: |
23+
cp Microsoft/config-wsl .config
24+
make -j$(nproc) mod2yesconfig
25+
make -j$(nproc) KCONFIG_CONFIG=.config
26+
27+
- name: Upload Artifacts
28+
uses: actions/upload-artifact@v4
29+
with:
30+
name: wsl2-kernel-artifacts
31+
path: |
32+
arch/x86/boot/bzImage
33+
.config
34+
35+
- name: Create GitHub Release
36+
id: create_release
37+
uses: softprops/action-gh-release@v2
38+
with:
39+
tag_name: wsl2-kernel-${{ github.run_id }}
40+
name: WSL2 Kernel Build
41+
draft: false
42+
prerelease: false
43+
files: |
44+
arch/x86/boot/bzImage
45+
.config

0 commit comments

Comments
 (0)