Update renovate action to update only current app
This commit is contained in:
parent
3dd7d7fe7d
commit
b920b326d6
6
.github/workflows/renovate-app-version.sh
vendored
6
.github/workflows/renovate-app-version.sh
vendored
|
@ -1,8 +1,10 @@
|
|||
#!/bin/bash
|
||||
# This script copies the version from docker-compose.yml to config.json.
|
||||
|
||||
# find all docker-compose files
|
||||
docker_compose_files=$(find apps -name docker-compose.yml)
|
||||
app_name=$1
|
||||
|
||||
# find all docker-compose files under apps/$app_name (there should be only one)
|
||||
docker_compose_files=$(find apps/$app_name -name docker-compose.yml)
|
||||
|
||||
for docker_compose_file in $docker_compose_files
|
||||
do
|
||||
|
|
17
.github/workflows/renovate-app-version.yml
vendored
17
.github/workflows/renovate-app-version.yml
vendored
|
@ -16,9 +16,22 @@ jobs:
|
|||
git config --local user.email "githubaction@githubaction.com"
|
||||
git config --local user.name "github-action update-app-version"
|
||||
|
||||
- name: Update app version
|
||||
- name: Get list of updated files by the last commit seperated by space
|
||||
id: updated-files
|
||||
run: |
|
||||
./.github/workflows/renovate-app-version.sh
|
||||
echo ${{github.sha}}
|
||||
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 <<< "${{ steps.updated-files.outputs.files }}"
|
||||
|
||||
for file in "${files[@]}"; do
|
||||
if [[ $file == *"docker-compose.yml"* ]]; then
|
||||
app_name=$(echo $file | cut -d'/' -f 2)
|
||||
./.github/workflows/renovate-app-version.sh $app_name
|
||||
fi
|
||||
done
|
||||
|
||||
- name: Commit & Push Changes
|
||||
run: |
|
||||
|
|
Loading…
Reference in New Issue
Block a user