mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 00:47:04 +02:00
ci: Make sure to only include proper chart folders
This commit is contained in:
parent
435c6097f0
commit
155946fb1e
4 changed files with 12 additions and 71 deletions
7
.github/actions/collect-charts/dist/index.js
vendored
7
.github/actions/collect-charts/dist/index.js
vendored
|
@ -126,8 +126,11 @@ function filterChangedCharts(files, parentFolder) {
|
|||
const absoluteFileDirname = path.resolve(path.dirname(file));
|
||||
const relativeFileDirname = absoluteFileDirname.slice(absoluteParentFolder.length + 1);
|
||||
const chartPathParts = relativeFileDirname.split("/");
|
||||
const chart = `${chartPathParts[0]}/${chartPathParts[1]}`;
|
||||
changedCharts.push(chart);
|
||||
const chartType = chartPathParts[0];
|
||||
const chartName = chartPathParts[1];
|
||||
if (chartType && chartName) {
|
||||
changedCharts.push(`${chartType}/${chartName}`);
|
||||
}
|
||||
});
|
||||
// Return only unique items
|
||||
return changedCharts.filter((item, index) => changedCharts.indexOf(item) === index);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue