From 201eed7d915ac0a6021fb402cde5be7a6b945b59 Mon Sep 17 00:00:00 2001 From: Federico Di Pierro Date: Wed, 8 May 2024 16:32:33 +0200 Subject: [PATCH] fix(action): always create symlinks, even when cached. Signed-off-by: Federico Di Pierro --- action.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/action.yml b/action.yml index d985d46..9ea38dc 100644 --- a/action.yml +++ b/action.yml @@ -46,8 +46,12 @@ runs: if: ${{ steps.cache-kernel-sources.outputs.cache-hit != 'true' }} run: | sudo mkdir -p /usr/src - sudo git clone --depth 1 --branch v$(uname -r) git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git /usr/src/linux - sudo rm /lib/modules/$(uname -r)/build - sudo ln -s /usr/src/linux-headers-$(uname -r)/ /lib/modules/$(uname -r)/build - sudo rm /lib/modules/$(uname -r)/source - sudo ln -s /usr/src/linux-headers-$(uname -r)/ /lib/modules/$(uname -r)/source + sudo git clone --depth 1 --branch v$KERNEL_RELEASE git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git /usr/src/linux + + - name: Create proper symlinks + shell: bash + run: | + sudo rm /lib/modules/$KERNEL_RELEASE/build + sudo ln -s /usr/src/linux-headers-$KERNEL_RELEASE/ /lib/modules/$KERNEL_RELEASE/build + sudo rm /lib/modules/$KERNEL_RELEASE/source + sudo ln -s /usr/src/linux-headers-$KERNEL_RELEASE/ /lib/modules/$KERNEL_RELEASE/source