-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat: add support for building docker actions with private registries #1557
Conversation
@ZauberNerd this pull request has failed checks 🛠 |
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.
Looks good, but there seems to be some formatting issues
This commit adds a new `LoadDockerAuthConfigs` function, which loads all registry auths that are configured on the host and sends them with the build command to the docker daemon. This is needed in case act builds a docker action and the images referenced in that docker action are located on private registries or otherwise require authentication (e.g. to get a higher rate limit). The code is adapted from how the docker cli works: https://github.com/docker/cli/blob/257ff41304bf121bdf1acdf00a1c7a896ed038d1/cli/command/image/build.go#L323-L332 Co-authored-by: Markus Wolf <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #1557 +/- ##
==========================================
+ Coverage 61.22% 61.26% +0.04%
==========================================
Files 46 46
Lines 7141 7167 +26
==========================================
+ Hits 4372 4391 +19
- Misses 2462 2467 +5
- Partials 307 309 +2
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
b08a03e
to
0aff358
Compare
🦙 MegaLinter status: ✅ SUCCESS
See detailed report in MegaLinter reports |
This commit adds a new
LoadDockerAuthConfigs
function, which loads all registry auths that are configured on the host and sends them with the build command to the docker daemon.This is needed in case act builds a docker action and the images referenced in that docker action are located on private registries or otherwise require authentication (e.g. to get a higher rate limit).
The code is adapted from how the docker cli works: https://github.com/docker/cli/blob/257ff41304bf121bdf1acdf00a1c7a896ed038d1/cli/command/image/build.go#L323-L332