Skip to content

Commit 559115b

Browse files
committed
Improve check for new kernel
1 parent f82534d commit 559115b

File tree

1 file changed

+7
-18
lines changed

1 file changed

+7
-18
lines changed

.github/workflows/check-kernel-release.yml

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,6 @@ jobs:
1414
fetch-depth: 0
1515
token: ${{ secrets.KERNEL_UPDATE_TOKEN }}
1616

17-
- name: Check out linux repository
18-
uses: actions/checkout@v4
19-
with:
20-
repository: kernelkit/linux
21-
path: linux
22-
fetch-depth: 0
23-
token: ${{ secrets.KERNEL_UPDATE_TOKEN }}
24-
2517
- name: Fetch kernel.org and check for 6.12 release
2618
id: check
2719
run: |
@@ -37,18 +29,15 @@ jobs:
3729
echo "current_version=$CURRENT_VERSION" >> $GITHUB_OUTPUT
3830
echo "Current 6.12 kernel version: $CURRENT_VERSION"
3931
40-
# Get the latest tag from our linux tree
41-
cd linux
42-
git fetch origin
43-
LATEST_TAG=$(git tag -l "v6.12.*" | sort -V | tail -n1 | sed 's/^v//')
44-
cd ..
32+
# Get the version from infix defconfig
33+
INFIX_VERSION=$(grep 'BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE=' configs/aarch64_defconfig | cut -d'"' -f2)
4534
46-
echo "latest_tag=$LATEST_TAG" >> $GITHUB_OUTPUT
47-
echo "Latest tag in our tree: $LATEST_TAG"
35+
echo "infix_version=$INFIX_VERSION" >> $GITHUB_OUTPUT
36+
echo "Infix kernel version: $INFIX_VERSION"
4837
49-
if [ "$CURRENT_VERSION" != "$LATEST_TAG" ]; then
38+
if [ "$CURRENT_VERSION" != "$INFIX_VERSION" ]; then
5039
echo "new_release=true" >> $GITHUB_OUTPUT
51-
echo "🎉 New 6.12 kernel released: $CURRENT_VERSION (our version: $LATEST_TAG)"
40+
echo "🎉 New 6.12 kernel released: $CURRENT_VERSION (infix version: $INFIX_VERSION)"
5241
else
5342
echo "new_release=false" >> $GITHUB_OUTPUT
5443
echo "No change - still at $CURRENT_VERSION"
@@ -94,7 +83,7 @@ jobs:
9483
title: `Upgrade to kernel ${{ steps.check.outputs.current_version }}`,
9584
head: 'kernel-upgrade',
9685
base: 'main',
97-
body: `Automated kernel upgrade to version ${{ steps.check.outputs.current_version }}.\n\n**Previous version:** ${{ steps.check.outputs.latest_tag }}\n**New version:** ${{ steps.check.outputs.current_version }}\n**Source:** https://www.kernel.org/\n\nThis PR was automatically created by the kernel release monitoring workflow.`
86+
body: `Automated kernel upgrade to version ${{ steps.check.outputs.current_version }}.\n\n**Previous version:** ${{ steps.check.outputs.infix_version }}\n**New version:** ${{ steps.check.outputs.current_version }}\n**Source:** https://www.kernel.org/\n\nThis PR was automatically created by the kernel release monitoring workflow.`
9887
});
9988
10089
// Add label

0 commit comments

Comments
 (0)