mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 08:57:04 +02:00
feat(app-template): Release version 3.7.1
This commit is contained in:
parent
433f6d132b
commit
b93c4199f7
10 changed files with 77 additions and 34 deletions
|
@ -33,27 +33,27 @@ runs:
|
|||
pattern: ${{ inputs.artifactPrefix }}${{ inputs.artifactPattern }}
|
||||
|
||||
- name: Copy artifacts to gh-pages structure
|
||||
shell: bash
|
||||
working-directory: artifacts
|
||||
env:
|
||||
ARTIFACT_PREFIX: ${{ inputs.artifactPrefix }}
|
||||
TARGET_FOLDER: ${{ inputs.targetFolder }}
|
||||
run: |
|
||||
while IFS= read -d $'\0' -r ARTIFACT ; do
|
||||
echo ${ARTIFACT}
|
||||
prefix_removed_chart=${ARTIFACT/#$ARTIFACT_PREFIX}
|
||||
DELIMITER='__'
|
||||
s=${prefix_removed_chart}${DELIMITER}
|
||||
ARTIFACT_PATH_PARTS=();
|
||||
while [[ $s ]]; do
|
||||
ARTIFACT_PATH_PARTS+=( "${s%%"${DELIMITER}"*}" );
|
||||
s=${s#*"${DELIMITER}"};
|
||||
done;
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const dstFolder = "${{ inputs.targetFolder }}";
|
||||
const artifactPrefix = "${{ inputs.artifactPrefix }}";
|
||||
|
||||
CHART_FOLDER=${ARTIFACT_PATH_PARTS[0]}
|
||||
mkdir -p "${TARGET_FOLDER}/${CHART_FOLDER}"
|
||||
cp ${ARTIFACT}/* ${TARGET_FOLDER}/${CHART_FOLDER}/
|
||||
done < <(find . -mindepth 1 -maxdepth 1 -type d -print0)
|
||||
baseDir = process.cwd();
|
||||
artifactsDir = `${baseDir}/artifacts`;
|
||||
|
||||
const globber = await glob.create(`${artifactsDir}/${artifactPrefix}*/*.tgz`);
|
||||
for await (const file of globber.globGenerator()) {
|
||||
relativePath = file.startsWith(artifactsDir) ? file.slice(artifactsDir.length) : file;
|
||||
artifactFolder = relativePath.split('/')[1];
|
||||
artifactFolderStrippedPrefix = artifactFolder.startsWith(artifactPrefix) ? artifactFolder.slice(artifactPrefix.length) : artifactFolder;
|
||||
chartType = artifactFolderStrippedPrefix.split('__')[0];
|
||||
targetFolder = `${baseDir}/${dstFolder}/${chartType}`;
|
||||
|
||||
console.log(`Copying ${file} to ${targetFolder}/`);
|
||||
await io.mkdirP(targetFolder);
|
||||
await io.cp(file, `${targetFolder}/`);
|
||||
}
|
||||
|
||||
- name: Update chart index
|
||||
shell: bash
|
||||
|
@ -67,4 +67,3 @@ runs:
|
|||
repository: ${{ inputs.targetFolder }}
|
||||
branch: ${{ inputs.targetBranch }}
|
||||
file_pattern: "index.yaml **/*.tgz"
|
||||
disable_globbing: true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue