Skip to content

Commit c74643e

Browse files
committed
Change to flatmap
1 parent e9a630d commit c74643e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/build-docker-artifacts-trigger-push.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,12 @@ jobs:
7777
7878
const imageTagAfterRetag = "${{ github.ref }}".replace('refs/heads/', '').replace('refs/tags/', '').replace(/[^a-zA-Z0-9._-]/g, '-');
7979
80-
const result = customers.map((c) => ({
80+
const result = customers.flatMap((c) => config.push?.[c] ? [{
8181
repository: process.env.REPOSITORY,
8282
customer: c,
8383
customer_json: JSON.stringify(config.push[c]),
8484
image_tag: imageTagAfterRetag,
85-
})).filter((c) => c.customer_json);
85+
}] : []);
8686
console.log(result);
8787
return result;
8888
env:

0 commit comments

Comments
 (0)