<#19353 Build and Push Docker image in CI> New dis...
# github-notifications
c
#19353 Build and Push Docker image in CI New discussion created by tomgun132 Hi, I've been reading about docker and CI using Pants. Locally, it works great and really simplifies the
dockerfile
. However, right now I want to put the build and push docker image process in the CI. Currently, my team uses the template from build-push-actions from docker. My questions are: • Is it possible to replace the
build and push action
step from here and change it with
pants publish ::
? • From this page, it says that
pants publish
builds image and push it to the registries. This mean, I can skip
pants package
, am I correct? • I have 2 variables that needs to be obtained from 2 github's action steps to build and push the images: one as docker's
build_args
, one as the image's tag. I assume that the latter can be put into
build_args
as well. However, can I do something like this:
IMAGE_TAG=${{steps.gen_tag.outputs.tag}} SOME_SECRET=${{steps.auth.outputs.token}} pants publish ::
• do the args from this answer can be applied to
pants publish
? I'm sorry for many questions but I've been stuck on this part of developing with Pants. Thank you. pantsbuild/pants