github env vars in snippets?

Is it possible to do something like this?
- type: containerfile
snippets:
- COPY --from=ghcr.io/ublue-os/${nvidia_kmod_container_name}:${nvidia_kmod_container_tag} /rpms /tmp/rpms
- type: containerfile
snippets:
- COPY --from=ghcr.io/ublue-os/${nvidia_kmod_container_name}:${nvidia_kmod_container_tag} /rpms /tmp/rpms
5 Replies
Luke Skywunker
Luke Skywunker•3w ago
Nope Something that I want to do is allow setting variables and secrets in .arg and .secret files and load those into the docker context which could then be used by the build
RoyalOughtness
RoyalOughtnessOP•3w ago
oh yeah that would be sweet as a workaround, could i docker pull in the action before calling the bluebuild action?
xyny
xyny•3w ago
you can COPY --from, you just can't use ${} right now
RoyalOughtness
RoyalOughtnessOP•3w ago
right but if i do that outside of bluebuild, will that be fine? as in, if i do it in actions.yml so i have access to env vars, will bluebuild be able to consume it wait! I could use a Containerfile with bluebuild containerfiles and then find/replace the vars? lemme try that @Luke Skywunker @xyny i ended up getting it working using this, which is either cursed or blessed depending on your perspective 😅 https://github.com/secureblue/secureblue/pull/946/files#diff-5c3fa597431eda03ac3339ae6bf7f05e1a50d6fc7333679ec38e21b337cb6721R84
Luke Skywunker
Luke Skywunker•3w ago
Lol clever

Did you find this page helpful?