Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ci): Sign kernel in images with ublue-os/kernel-signer #255

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/reusable-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ jobs:
fi
echo "IMAGE_NAME=${{ matrix.image_name }}-nvidia" >> $GITHUB_ENV
else
if [[ "${{ matrix.kernel_flavor }}" == "surface" ]]; then
echo "KERNEL_SUFFIX=surface" >> $GITHUB_ENV
fi
if [[ "${{ matrix.image_target }}" == "main" ]]; then
echo "IMAGE_NAME=${{ matrix.image_name }}-${{ matrix.kernel_flavor }}" >> $GITHUB_ENV
else
Expand Down Expand Up @@ -123,12 +126,14 @@ jobs:
[[ "${IS_STABLE_VERSION}" == "true" ]]; then
BUILD_TAGS+=("${TIMESTAMP}")
BUILD_TAGS+=("latest")
echo "DEFAULT_TAG=latest" >> $GITHUB_ENV
fi

if [[ "${IS_GTS_VERSION}" == "true" ]] && \
[[ "${IS_STABLE_VERSION}" == "true" ]]; then
BUILD_TAGS+=("gts-${TIMESTAMP}")
BUILD_TAGS+=("gts")
echo "DEFAULT_TAG=gts" >> $GITHUB_ENV
fi

if [[ "${{ github.event_name }}" == "pull_request" ]]; then
Expand All @@ -138,6 +143,7 @@ jobs:
done

alias_tags=("${COMMIT_TAGS[@]}")
echo "DEFAULT_TAG=${SHA_SHORT}-${VARIANT}" >> $GITHUB_ENV
else
alias_tags=("${BUILD_TAGS[@]}")
fi
Expand Down Expand Up @@ -232,6 +238,18 @@ jobs:
extra-args: |
--target=${{ matrix.image_target }}

- name: Sign kernel
uses: ublue-os/[email protected]
if: github.event_name != 'pull_request'
with:
image: ${{ steps.build_image.outputs.image }}
default-tag: ${{ env.DEFAULT_TAG }}
privkey: ${{ secrets.AKMOD_PRIVKEY_20230518 }}
pubkey: /etc/pki/akmods/certs/akmods-ublue.der
tags: ${{ steps.build_image.outputs.tags }}
kernel_suffix: ${{ env.KERNEL_SUFFIX }}
strip: false

# Workaround bug where capital letters in your GitHub username make it impossible to push to GHCR.
# https://github.com/macbre/push-to-ghcr/issues/12
- name: Lowercase Registry
Expand Down
Loading