feat (github workflow): backend service rebuild on pkg dependency change
This commit is contained in:
parent
aa6b88ea76
commit
bdcc8989f7
1 changed files with 9 additions and 1 deletions
10
.github/workflows/workers.yaml
vendored
10
.github/workflows/workers.yaml
vendored
|
|
@ -47,7 +47,15 @@ jobs:
|
|||
#
|
||||
# Getting the images to build
|
||||
#
|
||||
git diff --name-only HEAD HEAD~1 | grep backend/services | grep -vE ^ee/ | cut -d '/' -f3 | uniq > backend/images_to_build.txt
|
||||
|
||||
{
|
||||
git diff --name-only | grep backend/services | grep -vE ^ee/ | cut -d '/' -f3
|
||||
|
||||
git diff --name-only | grep backend/pkg | grep -vE ^ee/ | cut -d '/' -f3 | uniq | while read -r pkg_name ; do
|
||||
grep -rl "pkg/$pkg_name" backend/services | cut -d '/' -f3
|
||||
done
|
||||
} | uniq > backend/images_to_build.txt
|
||||
|
||||
[[ $(cat backend/images_to_build.txt) != "" ]] || (echo "Nothing to build here"; exit 0)
|
||||
#
|
||||
# Pushing image to registry
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue