Test special renovate folder naming and dependency fix

This commit is contained in:
kjeld Schouten-Lebbing 2021-02-08 20:54:55 +01:00
parent ec561f6512
commit c7e894b3ce
No known key found for this signature in database
GPG Key ID: 4CDAD4A532BC1EDB
1 changed files with 47 additions and 0 deletions

47
.github/workflows/charts-renovate.yaml vendored Normal file
View File

@ -0,0 +1,47 @@
name: "Charts: Renovate"
on:
push:
branches:
- 'renovate/**'
tags-ignore:
- '**'
jobs:
folderfix:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Install Helm
uses: azure/setup-helm@v1
with:
version: v3.5.2
- name: update folder names and dependencies
run: |
for chart in charts/*; do
if [ -d "${chart}" ]; then
maxfolderversion=$(ls -l ${chart} | grep ^d | awk '{print $9}' | tail -n 1)
maxchartversion=$(cat ${chart}/${maxfolderversion}/Chart.yaml | grep "^version: " | awk -F" " '{ print $2 }')
chartname=$(basename ${chart})
echo "Processing: ${chart} - folder: ${maxfolderversion} - version: ${maxchartversion}"
helm dependency update ${chart}/${maxfolderversion}
if [ "${maxfolderversion}" != "${maxchartversion}" ]; then
mv -f ${chart}/${maxfolderversion} ${chart}/${maxchartversion}
echo "renamed ${chart}/${maxfolderversion} to ${chart}/${maxchartversion}"
fi
fi
done
- name: Commit and push updated charts
run: |
git add --all
git commit --all -m "Update-Folder-Names-and-Dependencies"
git push