diff --git a/.github/workflows/notice-board.yml b/.github/workflows/notice-board.yml index 9a2085b54..0ceb35abf 100644 --- a/.github/workflows/notice-board.yml +++ b/.github/workflows/notice-board.yml @@ -45,6 +45,6 @@ jobs: if git diff --cached --quiet; then echo "没有文件变更,跳过提交" else - git commit --quiet -m "📝 docs(readme): update notice board" + git commit --quiet -m "docs(readme): update notice board" fi git push diff --git a/.github/workflows/renovate-app-version.yml b/.github/workflows/renovate-app-version.yml index 4eccf729d..b9cf35d17 100644 --- a/.github/workflows/renovate-app-version.yml +++ b/.github/workflows/renovate-app-version.yml @@ -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 diff --git a/renovate.json b/renovate.json index d08cc1742..756fc1799 100644 --- a/renovate.json +++ b/renovate.json @@ -308,5 +308,17 @@ "allowedVersions": "/^1.*/" } ], + "customManagers": [ + { + "description": "处理 shell 脚本中的镜像", + "customType": "regex", + "managerFilePatterns": ["/(^|/).+\\.sh$/"], + "matchStrings": [ + // 调试正则表达式: https://regexr.com/8jlns + "([\\S]+=)(?[\\S]+):(?[\\S]+)" + ], + "datasourceTemplate": "{{#if datasource}}{{{datasource}}}{{else}}docker{{/if}}" + } + ], "prCreation": "immediate" }