Skip to content

Commit

Permalink
Handle no src file changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Do committed Feb 8, 2024
1 parent f23357d commit 6bf4f1f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/templates/docker_context/docker_context.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ set -e

# Find docker compose files in 'modules' directory
modules=$(find modules -maxdepth 1 -name "docker-compose*")
modules_modified=false

# Initialize an empty array for JSON objects
json_objects=()
Expand All @@ -24,10 +23,13 @@ while read -r module; do
# Only work with modules that are modified
if [[ $1 = *$module_out* ]]; then
echo "$module_out modified"
modules_modified=true
else
echo "$module_out not changed"
continue
if [[ "$1" = "" || $1 = " " ]]; then
echo "Nothing is modified, but probably an infra change so test all modules"
else
continue
fi
fi

# Loop through each service
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/temp_ci_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # OR "2" -> To retrieve the preceding commit.
since_last_remote_commit: false

- name: Find changed files inside action folder
id: changed-files-action
Expand Down

0 comments on commit 6bf4f1f

Please sign in to comment.