Skip to content

Commit e85db95

Browse files
committed
fix: KERNEL_DIR
1 parent 9c0e873 commit e85db95

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

.github/workflows/build-kernel.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,16 @@ on:
1111
description: "Extra kernel config options (e.g. CONFIG_USB_VIDEO_CLASS=y)"
1212
required: false
1313
default: ""
14-
schedule:
15-
- cron: "0 0 * * 0" # Weekly builds
1614

1715
env:
1816
ARTIFACT_NAME: wsl2-kernel
1917

2018
jobs:
2119
build:
2220
runs-on: ubuntu-latest
21+
env:
22+
ARTIFACT_NAME: wsl2-kernel
23+
KERNEL_DIR: linux-${{ github.event.inputs.kernel_version }}
2324
steps:
2425
- name: Checkout repository
2526
uses: actions/checkout@v4
@@ -50,19 +51,22 @@ jobs:
5051
5152
- name: Build kernel
5253
run: |
53-
cd $KERNEL_SRC
54+
cd ${{ env.KERNEL_DIR }}
5455
make -j$(nproc)
5556
57+
- name: Verify bzImage exists
58+
run: |
59+
ls -lh ${{ env.KERNEL_DIR }}/arch/x86/boot/bzImage || echo "Error: bzImage not found!"
60+
5661
- name: Package artifact
5762
run: |
58-
mkdir -p $ARTIFACT_NAME
59-
cp $KERNEL_SRC/arch/x86/boot/bzImage $ARTIFACT_NAME/bzImage
60-
cp $KERNEL_SRC/.config $ARTIFACT_NAME/config
61-
echo "Kernel version: ${{ github.event.inputs.kernel_version }}" > $ARTIFACT_NAME/version.txt
62-
echo "Build date: $(date)" >> $ARTIFACT_NAME/version.txt
63+
mkdir -p ${{ env.ARTIFACT_NAME }}
64+
cp ${{ env.KERNEL_DIR }}/arch/x86/boot/bzImage ${{ env.ARTIFACT_NAME }}/
65+
cp ${{ env.KERNEL_DIR }}/.config ${{ env.ARTIFACT_NAME }}/
66+
echo "Version: ${{ github.event.inputs.kernel_version }}" > ${{ env.ARTIFACT_NAME }}/info.txt
6367
6468
- name: Upload artifact
6569
uses: actions/upload-artifact@v4
6670
with:
6771
name: ${{ env.ARTIFACT_NAME }}-${{ github.event.inputs.kernel_version }}
68-
path: $ARTIFACT_NAME
72+
path: ${{ env.ARTIFACT_NAME }}

0 commit comments

Comments
 (0)