Idea: apko-build inline configs
Closed this issue · 2 comments
imjasonh commented
Had an idea, not sure if it's a good one.
apko-build takes a path to a config file, but it could also take the actual contents of the config file:
- uses: chainguard-dev/actions/apko-build@main
with:
config: |
contents:
repositories:
- https://dl-cdn.alpinelinux.org/alpine/edge/main
packages:
- alpine-base
cmd: /bin/sh -l
archs:
- amd64
tag: ghcr.io/chainguard-dev/apko-example:latest
Nested YAML strings are kinda 🤮, it won't nicely check that the inner YAML is valid until apko
tries to run it. But it could be nice if you have a lot of configs in your repo that are only invoked by the GitHub action workflow.
Maybe config-contents
vs config
, and fail if both are specified. If neither are specified, still default to config: .apko.yaml
.
WDYT? @kaniini
kaniini commented
i don't think i like it, i want to be able to easily use apko directly to test configs and think this would introduce an antipattern
imjasonh commented
Yeah, good call. Closing.