-
Notifications
You must be signed in to change notification settings - Fork 29
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
list-targets: Allow passing multi-line files #247
Conversation
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.
Can you also add a new job for testing in https://github.com/docker/bake-action/blob/master/.github/workflows/ci-subaction.yml
Also missing DCO, see https://github.com/docker/bake-action/pull/247/checks?check_run_id=30087916762
subaction/list-targets/action.yml
Outdated
const files = `${{ inputs.files }}` | ||
? `${{ inputs.files }}` | ||
.replace(/\n/g, ',') | ||
.split(',') | ||
.filter(Boolean) | ||
: []; |
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 we can just use a regexp for this:
const files = `${{ inputs.files }}` ? `${{ inputs.files }}`.split(/[\r?\n,]+/) : [];
@crazy-max thanks so much for your review! I'll do this after my holiday. |
5dd4173
to
338eede
Compare
@crazy-max It's ready for review, please take a look and trigger the CI, thanks! |
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.
Thanks! Can you squash your commits please?
The matrix looks empty: https://github.com/docker/bake-action/actions/runs/11231844927/job/31222685804#step:4:5 |
ah yes, but the other two jobs are the same. I'm doing some changes to them. |
I think you could just create a # docker-bake.hcl
group "default" {
targets = ["t1", "t2", "t3"]
}
target "t1" {
target = "t1"
}
target "t2" {
target = "t2"
} # docker-bake-2.hcl
target "t3" {
target = "t3"
} |
Signed-off-by: Yuanhao Ji <jiyuanhao@apache.org>
5d740e8
to
d5f3322
Compare
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.
LGTM thanks!
Thanks for the quick and patient review! |
Previously only comma-separated values were supported:
Now we can pass multi-line values, which is much better:
I just made a quick change, can anyone review it? Thanks!