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 16, 2025
1 parent 2635d3b commit b9caa6c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/complete_flow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
run: |
echo "Reading versions from versions.json"
matrix=$(jq -c 'to_entries | map({service: .key, version: .value})' versions.json)
echo $matrix
echo "::set-output name=matrix::$matrix"
- name: Get previous commit hash
Expand All @@ -31,13 +32,15 @@ jobs:
- name: Get current version
id: current_versions
run: |
current_version=$(jq -c --arg service "${{ matrix.service_version.service }}" '.[$service]' versions.json)
current_version=$(jq -c --arg service "${{ steps.get-versions.output.matrix.service_version.service }}" '.[$service]' versions.json)
echo $current_version
echo "::set-output name=current_version::${current_version}"
- name: Get previous version
id: previous_versions
run: |
previous_version=$(git show ${{ steps.previous_commit.outputs.commit_hash }}:versions.json | jq -c --arg service "${{ matrix.service_version.service }}" '.[$service]')
previous_version=$(git show ${{ steps.previous_commit.outputs.commit_hash }}:versions.json | jq -c --arg service "${{ steps.get-versions.output.matrix.service_version.service }}" '.[$service]')
echo $previous_version
echo "::set-output name=previous_version::${previous_version}"
- name: Check for version changes
Expand All @@ -50,7 +53,7 @@ jobs:
echo "Previous Version: $previous_version"
if [[ "$current_version" != "$previous_version" ]]; then
echo "${{ matrix.service_version.service }}" >> changed_services.txt
echo "${{ steps.get-versions.output.matrix.matrix.service_version.service }}" >> changed_services.txt
fi
- name: Collect changes
Expand Down

0 comments on commit b9caa6c

Please sign in to comment.