Skip to content

Commit

Permalink
enable kernel pinning per workflow call
Browse files Browse the repository at this point in the history
  • Loading branch information
m2Giles committed Nov 3, 2024
1 parent 3d016e6 commit f4b7ff3
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/reusable-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ on:
description: "The Fedora Version: gts, stable, or latest"
required: true
type: string
kernel_pin:
description: "The full kernel version to pin"
type: string
outputs:
images:
description: "An array of images built and pushed to the registry"
Expand Down Expand Up @@ -112,6 +115,19 @@ jobs:
exit 1
fi
kernel_pin="${{ inputs.kernel_pin }}"
if [[ -n "${kernel_pin:-}" ]]; then
kernel_release="${kernel_pin}"
fedora_version="$(grep -oP 'fc\K[0-9]+' <<< ${kernel_pin})"
# check to make sure pin exists
if [[ $(skopeo inspect docker://ghcr.io/ublue-os/"${{ env.AKMODS_FLAVOR }}"-kernel:"${kernel_pin}" | jq -r '.Labels["ostree.linux"]') != "${kernel_pin}" ]]; then
echo "Kernel Pin does not exist"
exit 1
fi
fi
# Push into GITHUB ENV
echo "KERNEL_RELEASE=$kernel_release" >> $GITHUB_ENV
echo "FEDORA_VERSION=$fedora_version" >> $GITHUB_ENV
Expand Down

0 comments on commit f4b7ff3

Please sign in to comment.