-
Notifications
You must be signed in to change notification settings - Fork 259
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
Clarify usage for Docker build processes, especially with deployment keys #145
Conversation
The current docs mention only `docker/build-push-action` in conjunction with deploy keys. This might mislead users to believe, that this only applies to said Action. But the concept applies to all workflows that somehow use `docker build` with deploy keys. This PR clarifies the relevant section.
@j-riebe I did some minor changes and additions, would like to get your 👍. Also, @danseeley, would you say this resolves #152? |
ssh: | | ||
default=${{ env.SSH_AUTH_SOCK }} | ||
- name: Docker build | ||
# build-push-action | docker [compose] build | etc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@j-riebe should we mention here that additional flags/parameters need to be given to docker
to forward the SSH_AUTH_SOCK
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a hint would be good (although it should be "clear" from the previous section).
Would you only mention it (and expect the user to be aware of the --ssh
parameter) or provide examples?
Like:
- build-push-action (copied from section above)
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
ssh: |
default=${{ env.SSH_AUTH_SOCK }}
docker build --ssh default=SSH_AUTH_SOCK
(docker docs)docker compose build --ssh default=SSH_AUTH_SOCK
(docker docs)
Maybe we just append the --ssh default=${{ env.SSH_AUTH_SOCK}}
to the lines 132 & 133.
That should make it pretty obvious.
Looking for @danseely |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mpdude 👍
I do see that this adds some additional helpful context around how to use this action with a raw docker build command. This definitely would have helped me get up & running a bit more quickly. However, it does not cover the issue I found and outlined in #152. Namely, I found that in my particular situation, the ssh config wasn't being written into Full disclosure, I'm currently migrating our CI stack from Gitlab over to Github, and don't have a ton of experience with Github Actions & Workflows, so I'm learning as I go here. Thus, I can't say if the issue I ran across is particular to my specific situation or not. I can't say if my issue should be addressed in this change, that's up to @mpdude et al. |
Very good, but I think the Docker documentation is also worth mentioning: Edit: I've lost a couple of hours just debugging multi deploy keys when I found that this change was what I needed |
Finally got a chance to finish this. Thanks to everyone involved! |
The current docs mention only
docker/build-push-action
in conjunction with deploy keys.This might mislead users to believe, that this only applies to said Action. But the concept applies to all workflows that somehow use
docker build
with deploy keys.This PR clarifies the relevant section.