Skip to content

Allow to use secret file mount#296

Merged
crazy-max merged 2 commits intodocker:masterfrom
crazy-max:secret-file
Feb 16, 2021
Merged

Allow to use secret file mount#296
crazy-max merged 2 commits intodocker:masterfrom
crazy-max:secret-file

Conversation

@crazy-max
Copy link
Copy Markdown
Member

Fixes #293

@ngraef You can try with crazy-max/docker-build-push-action@secret-file.

Signed-off-by: CrazyMax crazy-max@users.noreply.github.com

@crazy-max crazy-max requested a review from tonistiigi February 14, 2021 21:38
@ngraef
Copy link
Copy Markdown

ngraef commented Feb 14, 2021

Works great! Thanks!

@tonistiigi
Copy link
Copy Markdown
Member

I'm a bit worried about the ambiguity here. Would be very surprising if a secret value would ever collide with a path. Could we somehow make it clear that the user expects the value to be a path?

@ngraef
Copy link
Copy Markdown

ngraef commented Feb 15, 2021

@tonistiigi My suggestions in #293 were a new action input (secret-files: npmrc=path/to/file) or a special syntax in the secrets input that could be intermixed with string secrets (secrets: file:npmrc=path/to/file). What do you think?

@tonistiigi
Copy link
Copy Markdown
Member

@ngraef SGTM, secrets: file:npmrc=path/to/file is still at least theoretically ambiguous as : could be part of the ID as well.

@crazy-max
Copy link
Copy Markdown
Member Author

@tonistiigi @ngraef

I'm a bit worried about the ambiguity here. Would be very surprising if a secret value would ever collide with a path. Could we somehow make it clear that the user expects the value to be a path?

A new input SGTM.

@codecov-io
Copy link
Copy Markdown

codecov-io commented Feb 15, 2021

Codecov Report

Merging #296 (33eec15) into master (e5f26cd) will increase coverage by 0.04%.
The diff coverage is 88.23%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #296      +/-   ##
==========================================
+ Coverage   74.34%   74.39%   +0.04%     
==========================================
  Files           4        4              
  Lines         152      164      +12     
  Branches       26       28       +2     
==========================================
+ Hits          113      122       +9     
- Misses         21       22       +1     
- Partials       18       20       +2     
Impacted Files Coverage Δ
src/buildx.ts 75.86% <81.81%> (-0.14%) ⬇️
src/context.ts 72.82% <100.00%> (+0.09%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e5f26cd...33eec15. Read the comment docs.

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
@crazy-max
Copy link
Copy Markdown
Member Author

@tonistiigi @ngraef secret-files input has been added. Let me know if it looks good to you (can be tested with crazy-max/docker-build-push-action@secret-file).

@ngraef
Copy link
Copy Markdown

ngraef commented Feb 15, 2021

Just tested. secret-files works for me.

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support secret file mount

4 participants