|
73 | 73 | tag="$(./scripts/tag-names.sh \ |
74 | 74 | --stellar-cli-version ${{ matrix.stellar_cli_version }} \ |
75 | 75 | --rust-version ${{ matrix.rust_base_key }} \ |
76 | | - --platform ${{ matrix.platform }})" |
| 76 | + --platform ${{ matrix.platform }} \ |
| 77 | + --stellar-cli-ref ${{ matrix.stellar_cli_ref }})" |
77 | 78 | echo "tag=$tag" >> "$GITHUB_OUTPUT" |
78 | 79 | echo "image=$REGISTRY:$tag" >> "$GITHUB_OUTPUT" |
79 | 80 |
|
@@ -232,42 +233,40 @@ jobs: |
232 | 233 | with: |
233 | 234 | username: ${{ secrets.DOCKERHUB_USERNAME }} |
234 | 235 | password: ${{ secrets.DOCKERHUB_TOKEN }} |
235 | | - - name: create manifest lists per (cli, rust base) pair |
| 236 | + - name: create manifest list per (cli, rust base) pair |
236 | 237 | run: | |
237 | 238 | stellar_cli_ref="$(jq -r --arg v "$STELLAR_CLI_VERSION" \ |
238 | 239 | '.stellar_cli_versions[] | select(.version == $v) | .ref' builds.json \ |
239 | 240 | | head -n1)" |
240 | 241 | test -n "$stellar_cli_ref" \ |
241 | 242 | || { echo "::error::no stellar_cli_versions entry for $STELLAR_CLI_VERSION"; exit 1; } |
242 | 243 | while IFS= read -r key; do |
| 244 | + list_tag="$(./scripts/tag-names.sh \ |
| 245 | + --stellar-cli-version "$STELLAR_CLI_VERSION" --rust-version "$key" \ |
| 246 | + --stellar-cli-ref "$stellar_cli_ref")" |
243 | 247 | amd64_tag="$(./scripts/tag-names.sh \ |
244 | 248 | --stellar-cli-version "$STELLAR_CLI_VERSION" --rust-version "$key" \ |
245 | | - --platform linux/amd64)" |
| 249 | + --platform linux/amd64 \ |
| 250 | + --stellar-cli-ref "$stellar_cli_ref")" |
246 | 251 | arm64_tag="$(./scripts/tag-names.sh \ |
247 | 252 | --stellar-cli-version "$STELLAR_CLI_VERSION" --rust-version "$key" \ |
248 | | - --platform linux/arm64)" |
249 | | - plain_tag="$(./scripts/tag-names.sh \ |
250 | | - --stellar-cli-version "$STELLAR_CLI_VERSION" --rust-version "$key")" |
251 | | - hash_tag="$(./scripts/tag-names.sh \ |
252 | | - --stellar-cli-version "$STELLAR_CLI_VERSION" --rust-version "$key" \ |
| 253 | + --platform linux/arm64 \ |
253 | 254 | --stellar-cli-ref "$stellar_cli_ref")" |
254 | | - for list_tag in "$plain_tag" "$hash_tag"; do |
255 | | - if docker buildx imagetools inspect "$REGISTRY:$list_tag" >/dev/null 2>&1; then |
256 | | - echo "::warning::manifest list $REGISTRY:$list_tag already exists; skipping (lists are immutable)" |
257 | | - { |
258 | | - echo "## ⚠️ Manifest list skipped — already published" |
259 | | - echo "" |
260 | | - echo "\`$REGISTRY:$list_tag\` was already in the registry." |
261 | | - } >> "$GITHUB_STEP_SUMMARY" |
262 | | - continue |
263 | | - fi |
264 | | - echo "::group::manifest $REGISTRY:$list_tag" |
265 | | - docker buildx imagetools create \ |
266 | | - --tag "$REGISTRY:$list_tag" \ |
267 | | - "$REGISTRY:$amd64_tag" \ |
268 | | - "$REGISTRY:$arm64_tag" |
269 | | - echo "::endgroup::" |
270 | | - done |
| 255 | + if docker buildx imagetools inspect "$REGISTRY:$list_tag" >/dev/null 2>&1; then |
| 256 | + echo "::warning::manifest list $REGISTRY:$list_tag already exists; skipping (lists are immutable)" |
| 257 | + { |
| 258 | + echo "## ⚠️ Manifest list skipped — already published" |
| 259 | + echo "" |
| 260 | + echo "\`$REGISTRY:$list_tag\` was already in the registry." |
| 261 | + } >> "$GITHUB_STEP_SUMMARY" |
| 262 | + continue |
| 263 | + fi |
| 264 | + echo "::group::manifest $REGISTRY:$list_tag" |
| 265 | + docker buildx imagetools create \ |
| 266 | + --tag "$REGISTRY:$list_tag" \ |
| 267 | + "$REGISTRY:$amd64_tag" \ |
| 268 | + "$REGISTRY:$arm64_tag" |
| 269 | + echo "::endgroup::" |
271 | 270 | done < <(jq -r --arg v "$STELLAR_CLI_VERSION" ' |
272 | 271 | .stellar_cli_versions[] |
273 | 272 | | select(.version == $v) |
@@ -295,9 +294,13 @@ jobs: |
295 | 294 | default_rust="$(jq -r --arg v "$STELLAR_CLI_VERSION" \ |
296 | 295 | '.stellar_cli_versions[] | select(.version == $v) | .default_rust' \ |
297 | 296 | builds.json | head -n1)" |
| 297 | + stellar_cli_ref="$(jq -r --arg v "$STELLAR_CLI_VERSION" \ |
| 298 | + '.stellar_cli_versions[] | select(.version == $v) | .ref' builds.json \ |
| 299 | + | head -n1)" |
298 | 300 | target_tag="$(./scripts/tag-names.sh \ |
299 | 301 | --stellar-cli-version "$STELLAR_CLI_VERSION" \ |
300 | | - --rust-version "$default_rust")" |
| 302 | + --rust-version "$default_rust" \ |
| 303 | + --stellar-cli-ref "$stellar_cli_ref")" |
301 | 304 | target="$REGISTRY:$target_tag" |
302 | 305 |
|
303 | 306 | echo "::group::alias $REGISTRY:$STELLAR_CLI_VERSION -> $target" |
|
0 commit comments