1
0
Fork 0

build(renovate): extend workflow to handle script version updates

- add logic to process .sh script files in /apps/*/scripts/ directories
- extract new version from script content and rename app version directory
- update commit logic to include script files alongside docker-compose.yml
This commit is contained in:
pooneyy 2026-02-05 15:20:25 +08:00
parent 36e1be84a8
commit 5c2361485f
No known key found for this signature in database
1 changed files with 8 additions and 1 deletions

View File

@ -84,6 +84,13 @@ jobs:
old_version=$(echo $file | cut -d'/' -f 3)
python3 .github/workflows/renovate-app-version.py $app_name $old_version
fi
if [[ $file == *"/scripts/"*.sh ]]; then
app_name=$(echo $file | cut -d'/' -f 2)
old_version=$(echo $file | cut -d'/' -f 3)
new_version=$(grep -P -o '[\S]+=[\S]+:\K[\S]+' $file | head -1)
mv apps/$app_name/$old_version apps/$app_name/$new_version
echo $new_version > apps/$app_name/${old_version}.version
fi
done
- name: Commit & Push Changes
@ -91,7 +98,7 @@ jobs:
IFS=' ' read -ra files <<< "${{ steps.updated-files.outputs.files }}"
commits_counter=0
for file in "${files[@]}"; do
if [[ $file == *"docker-compose.yml"* ]]; then
if [[ $file == *"docker-compose.yml"* || $file == *"/scripts/"*.sh ]]; then
app_name=$(echo $file | cut -d'/' -f 2)
old_version=$(echo $file | cut -d'/' -f 3)
if [ -f "apps/$app_name/${old_version}.version" ]; then