Skip to content

Add imageSource: get func binary from a container image - #5

Open
gauron99 wants to merge 1 commit into
mainfrom
push-sqosurmnusoo
Open

gauron99 wants to merge 1 commit into
mainfrom
push-sqosurmnusoo

Conversation

@gauron99

Copy link
Copy Markdown
Collaborator
  • new imageSource input: copy the func binary out of a container image instead of downloading it
  • new imagePath input: path of the binary inside the image, defaults to /ko-app/func (where ko puts it in ghcr.io/knative/func/func)
  • uses the docker CLI (docker create, docker cp, docker rm), so private registries work after a docker/login-action step
  • imageSource overrides version (like binarySource) and skips the stale version warning
  • setting both imageSource and binarySource fails
  • updated README.md & action.yml
  • workflow tests: ghcr.io/knative/func/func:latest as source, and both sources set (should fail)

please note

  • the image must hold a binary for the runner's OS, so in practice this needs a Linux runner (macOS runners have no docker, Windows runners run Windows containers)
  • ghcr.io/knative/func/func only has a latest tag (built from main), so for upstream this is close to version: nightly; the main use is custom or private builds

🤖 Generated with Claude Code

New inputs:
- imageSource: image to copy the binary from (overrides version,
  cannot be combined with binarySource)
- imagePath: path inside the image, default /ko-app/func (where ko
  puts it in ghcr.io/knative/func/func)

The action runs 'docker create', 'docker cp' and 'docker rm', so
private registries work after a docker login step. The image must
hold a binary for the runner's OS, so in practice this needs a Linux
runner with docker.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant