Skip to content

Commit baa41b0

Browse files
committed
chore: try to avoid jq involvement in this section
1 parent c9ff94f commit baa41b0

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

.github/workflows/dockerhub-release-matrix.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,18 +99,27 @@ jobs:
9999
name: version-info-${{ matrix.version }}
100100
path: ./versions/
101101

102-
- if: contains(needs.prepare.outputs.matrix_config, format('"{0}"', matrix.version))
103-
id: combine-outputs
102+
- id: combine-outputs
104103
run: |
105104
# Wait for other matrix jobs to complete by sleeping briefly
106105
sleep 15
107106
107+
# First verify if this is the controlling job
108+
matrix_json='${{ needs.prepare.outputs.matrix_config }}'
109+
first_version=$(echo "$matrix_json" | grep -o '"version":"[^"]*"' | sed 's/.*:"//;s/"//' | head -1)
110+
current_version="${{ matrix.version }}"
111+
112+
# Only proceed if this is the controlling job (matches first version)
113+
if [ "$current_version" != "$first_version" ]; then
114+
echo "This is not the controlling job. Skipping."
115+
exit 0
116+
fi
117+
108118
versions_array="["
109119
tags_array="["
110120
first=true
111121
112122
# Extract versions using grep and sed
113-
matrix_json='${{ needs.prepare.outputs.matrix_config }}'
114123
versions=$(echo "$matrix_json" | grep -o '"version":"[^"]*"' | sed 's/.*:"//;s/"//')
115124
116125
# For each version

0 commit comments

Comments
 (0)