-
Notifications
You must be signed in to change notification settings - Fork 581
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build Push action v2 #92
Conversation
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
@tonistiigi I've done some tests for using git via buildkit and it turns out that implementing it in our action would add a layer of complexity that I think should be delegated to actions/checkout. As you can see in their Usage section, they already managed rough cases like credentials persistance, submodules, token, ssh key. Their code base is also quite huge to handle all the special cases so I wonder if we should really implement and maintain this layer in our action. |
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
@crazy-max We shouldn't do any of these complicated cases in our action code. But buildkit does have first-class support for building from git (as did old docker build) and we should just reuse it. There is no need to have any kind of compatibility with all the There are many benefits for building from git. Eg. even in current BuildKit CI that still uses travis, even though travis automatically does a checkout, we ignore it and just pass the git ref from |
Ok LGTM. I will add an example and tests using git and the github token with the current implementation. |
@crazy-max So context path can be set to local path, git path or HTTP(s) path. If git path is set, expose token as well. If no value is set then it defaults to the git path that is determined from the environment variables. |
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
@crazy-max - thanks for making the changes. The way I read this, you have a separate buildx action, and then reference it in the build-push action. What if I don't use buildx, and build using some other means - how can I say that the build is done locally, just push it? |
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Mutable tag created: https://github.com/docker/build-push-action/tree/v2 |
Ref. #71
v2 of Build Push action allows to use Docker Buildx. It's also rewritten as a typescript-action to be as closed as possible of the GitHub Runner during its execution.
path
input tocontext
dockerfile
input tofile
always_pull
input topull
builder
input to be able to choose a builder instance through setup-buildx actionplatforms
inputallow
inputload
inputoutputs
inputcache-from
inputcache-to
inputsecrets
inputtags
inputcache_froms
inputdigest
outputOther features (maybe future?)
tag_with_sha
,tag_with_ref
,add_git_labels
inputsDocker login
As stipulated during our Zoom session, the authentication part has been removed and will be handled by a dedicated action. This will allow actions such as Azure Container Registry Login or Amazon ECR "Login" to work efficiently with it. I have also created an action allowing authentication with several examples to authenticate against registries. We will be able to move the repository within the organization if it suits you (repo will be named docker/login-action for example):
Deprecation notice
It would be advisable to set up a deprecation notice on the action currently in place in order to inform users of a new major version. This can be done directly in the
action.yml
file like this.