Skip to content

Commit 201eed7

Browse files
FedeDPalexellis
authored andcommitted
fix(action): always create symlinks, even when cached.
Signed-off-by: Federico Di Pierro <[email protected]>
1 parent a59b23a commit 201eed7

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

action.yml

+9-5
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,12 @@ runs:
4646
if: ${{ steps.cache-kernel-sources.outputs.cache-hit != 'true' }}
4747
run: |
4848
sudo mkdir -p /usr/src
49-
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
50-
sudo rm /lib/modules/$(uname -r)/build
51-
sudo ln -s /usr/src/linux-headers-$(uname -r)/ /lib/modules/$(uname -r)/build
52-
sudo rm /lib/modules/$(uname -r)/source
53-
sudo ln -s /usr/src/linux-headers-$(uname -r)/ /lib/modules/$(uname -r)/source
49+
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
50+
51+
- name: Create proper symlinks
52+
shell: bash
53+
run: |
54+
sudo rm /lib/modules/$KERNEL_RELEASE/build
55+
sudo ln -s /usr/src/linux-headers-$KERNEL_RELEASE/ /lib/modules/$KERNEL_RELEASE/build
56+
sudo rm /lib/modules/$KERNEL_RELEASE/source
57+
sudo ln -s /usr/src/linux-headers-$KERNEL_RELEASE/ /lib/modules/$KERNEL_RELEASE/source

0 commit comments

Comments
 (0)