From baa41b09aba88d0e02af02d724352e0e2406670a Mon Sep 17 00:00:00 2001 From: Sam Rose Date: Tue, 17 Dec 2024 15:56:41 -0500 Subject: [PATCH] chore: try to avoid jq involvement in this section --- .github/workflows/dockerhub-release-matrix.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dockerhub-release-matrix.yml b/.github/workflows/dockerhub-release-matrix.yml index 67a590155..8011dcb5e 100644 --- a/.github/workflows/dockerhub-release-matrix.yml +++ b/.github/workflows/dockerhub-release-matrix.yml @@ -99,18 +99,27 @@ jobs: name: version-info-${{ matrix.version }} path: ./versions/ - - if: contains(needs.prepare.outputs.matrix_config, format('"{0}"', matrix.version)) - id: combine-outputs + - id: combine-outputs run: | # Wait for other matrix jobs to complete by sleeping briefly sleep 15 + # First verify if this is the controlling job + matrix_json='${{ needs.prepare.outputs.matrix_config }}' + first_version=$(echo "$matrix_json" | grep -o '"version":"[^"]*"' | sed 's/.*:"//;s/"//' | head -1) + current_version="${{ matrix.version }}" + + # Only proceed if this is the controlling job (matches first version) + if [ "$current_version" != "$first_version" ]; then + echo "This is not the controlling job. Skipping." + exit 0 + fi + versions_array="[" tags_array="[" first=true # Extract versions using grep and sed - matrix_json='${{ needs.prepare.outputs.matrix_config }}' versions=$(echo "$matrix_json" | grep -o '"version":"[^"]*"' | sed 's/.*:"//;s/"//') # For each version