mirror of
https://github.com/okxlin/appstore.git
synced 2026-03-02 23:07:53 +08:00
feat:Update renovate-app-version.yml
This commit is contained in:
parent
cc71381e3d
commit
263e208a9e
11
.github/workflows/renovate-app-version.yml
vendored
11
.github/workflows/renovate-app-version.yml
vendored
@ -19,29 +19,30 @@ jobs:
|
||||
git config --local user.name "github-action update-app-version"
|
||||
|
||||
- name: Get list of updated files by the last commit in this branch separated by space
|
||||
id: updated-files
|
||||
run: |
|
||||
echo "FILES=$(git diff-tree --no-commit-id --name-only -r ${{ github.sha }} | tr '\n' ' ')" >> $GITHUB_ENV
|
||||
echo "::set-output name=files::$(git diff-tree --no-commit-id --name-only -r ${{ github.sha }} | tr '\n' ' ')"
|
||||
|
||||
- name: Run renovate-app-version.sh on updated files
|
||||
run: |
|
||||
IFS=' ' read -ra files <<< "${{ env.FILES }}"
|
||||
IFS=' ' read -ra files <<< "${{ steps.updated-files.outputs.files }}"
|
||||
|
||||
for file in "${files[@]}"; do
|
||||
if [[ $file == *"docker-compose.yml"* ]]; then
|
||||
app_name=$(echo $file | cut -d'/' -f 2)
|
||||
old_version=$(echo $file | cut -d'/' -f 3)
|
||||
chmod +x .github/workflows/renovate-app-version.sh
|
||||
echo "$app_name $old_version" >> $GITHUB_STATE
|
||||
.github/workflows/renovate-app-version.sh $app_name $old_version
|
||||
fi
|
||||
done
|
||||
|
||||
- name: Commit & Push Changes
|
||||
run: |
|
||||
IFS=' ' read -ra files <<< "${{ env.FILES }}"
|
||||
IFS=' ' read -ra files <<< "${{ steps.updated-files.outputs.files }}"
|
||||
|
||||
for file in "${files[@]}"; do
|
||||
if [[ $file == *"docker-compose.yml"* ]]; then
|
||||
app_name=$(echo $file | cut -d'/' -f 2)
|
||||
git add "$app_name/*" && git commit -m "Update app version" --no-verify && git push origin localApps || true
|
||||
git add "$app_name/*" && git commit -m "Update app version" --no-verify && git push || true
|
||||
fi
|
||||
done
|
||||
|
||||
Loading…
Reference in New Issue
Block a user