Skip to content

Commit

Permalink
fix(action): Support passing repository, default to localhost
Browse files Browse the repository at this point in the history
  • Loading branch information
EyeCantCU authored May 18, 2024
1 parent 4fa410e commit 6101f34
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ name: 'Kernel Signer'
author: 'EyeCantCU'
description: 'Signs kernel in image via Podman'
inputs:
image:
description: 'Image containing kernel'
required: true
kernel_suffix:
description: 'Allows passing a custom kernel suffix. Only use if kernel package name has been changed'
required: false
Expand All @@ -16,6 +13,10 @@ inputs:
description: 'Public key, path to public key, or URL to retrieve public key'
default: '/etc/pki/kernel/public/public_key.der'
required: true
repository:
description: 'Repository containing image'
default: 'localhost'
required: true
tags:
description: 'Tags used by container'
default: 'latest'
Expand All @@ -26,7 +27,7 @@ runs:
- name: Sign kernel
shell: bash
run: |
CONTAINER_ID=$(podman run --pull missing --entrypoint /bin/bash --replace --name $(basename "${{ inputs.image }}") -dt "${{ inputs.image }}")
CONTAINER_ID=$(podman run --pull missing --entrypoint /bin/bash --replace --name $(basename "${{ inputs.image }}") -dt "${{ inputs.repository }}/${{ inputs.image }}")
podman cp "${{ github.action_path }}"/sign-kernel.sh $(basename "${{ inputs.image }}"):/tmp/sign-kernel.sh
podman exec -e KERNEL_SUFFIX="${{ inputs.kernel_suffix }}" -e PRIVKEY="${{ inputs.privkey }}" -e PUBKEY="${{ inputs.pubkey }}" $(basename "${{ inputs.image }}") "/tmp/sign-kernel.sh"
buildah commit "$CONTAINER_ID" "${{ inputs.image }}"
Expand Down

0 comments on commit 6101f34

Please sign in to comment.