Merge branch 'config' into localApps
This commit is contained in:
commit
37fb2d6e2a
|
|
@ -3,16 +3,13 @@ name: Update app version in Renovate Branches
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ 'renovate/*' ]
|
branches: [ 'renovate/*' ]
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
manual-trigger:
|
|
||||||
description: 'Manually trigger Renovate'
|
|
||||||
default: ''
|
|
||||||
jobs:
|
jobs:
|
||||||
update-app-version:
|
update-app-version:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
statuses: write
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v5.0.0
|
uses: actions/checkout@v5.0.0
|
||||||
|
|
@ -23,6 +20,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
git config --local user.email "githubaction@githubaction.com"
|
git config --local user.email "githubaction@githubaction.com"
|
||||||
git config --local user.name "github-action"
|
git config --local user.name "github-action"
|
||||||
|
gh auth login --with-token <<< "${{ github.token }}"
|
||||||
|
|
||||||
- name: Get list of updated files by the last commit in this branch separated by space
|
- name: Get list of updated files by the last commit in this branch separated by space
|
||||||
id: updated-files
|
id: updated-files
|
||||||
|
|
@ -50,8 +48,17 @@ jobs:
|
||||||
if [[ $file == *"docker-compose.yml"* ]]; then
|
if [[ $file == *"docker-compose.yml"* ]]; then
|
||||||
app_name=$(echo $file | cut -d'/' -f 2)
|
app_name=$(echo $file | cut -d'/' -f 2)
|
||||||
old_version=$(echo $file | cut -d'/' -f 3)
|
old_version=$(echo $file | cut -d'/' -f 3)
|
||||||
|
if [ -f "apps/$app_name/${old_version}.version" ]; then
|
||||||
new_version=$(cat "apps/$app_name/${old_version}.version")
|
new_version=$(cat "apps/$app_name/${old_version}.version")
|
||||||
rm -f "apps/$app_name/${old_version}.version"
|
rm -f "apps/$app_name/${old_version}.version"
|
||||||
git add "apps/$app_name/*" && git commit -m "🔧 chore($app_name): update app version from $old_version to $new_version [skip ci]" --no-verify && git push || true
|
git add "apps/$app_name/*" && git commit -m "🔧 chore($app_name): update app version from $old_version to $new_version" --no-verify && git push || true
|
||||||
|
gh api --method POST -H "Accept: application/vnd.github+json" \
|
||||||
|
-H "X-GitHub-Api-Version: 2022-11-28" \
|
||||||
|
/repos/${{ github.repository }}/statuses/$(git show -s --format=%H) \
|
||||||
|
-f 'state=success' \
|
||||||
|
-f 'target_url=https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}' \
|
||||||
|
-f 'description=CI/CD' \
|
||||||
|
-f 'context=${{ github.workflow}}'
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
Loading…
Reference in New Issue