Skip to content

Commit

Permalink
Update complete_flow.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
soringumeni1 authored Jan 15, 2025
1 parent 4287e24 commit d58b603
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/complete_flow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,18 @@ jobs:
- name: Check for version changes
id: check-versions
run: |
changed_matrix=[]
echo ${{ steps.get-versions.outputs.matrix }} | jq -c '.[]' | while read -r service_version; do
matrix=${{ steps.get-versions.outputs.matrix }}
changed_matrix="[]"
echo $matrix | jq -c '.[]' | while read -r service_version; do
service=$(echo "$service_version" | jq -r '.service')
current_version=$(echo "$service_version" | jq -r '.version')
previous_version=$(git show ${{ steps.previous_commit.outputs.commit_hash }}:versions.json | jq -r --arg service "$service" '.[$service]')
if [[ "$current_version" != "$previous_version" ]]; then
changed_matrix=$(echo "$changed_matrix" | jq --arg service "$service" --arg version "$current_version" '. += [{"service": $service, "version": $version}]')
changed_matrix=$(echo "$changed_matrix" | jq --arg service "$service" --arg version "$current_version" '. + [{"service": $service, "version": $version}]')
fi
done
echo "::set-output name=changed_matrix::${changed_matrix}"
echo "::set-output name=changed_matrix::$changed_matrix"
- name: Log changed matrix
run: |
Expand Down

0 comments on commit d58b603

Please sign in to comment.