From 2bc23cda4a4fde89414d45610b0ed53f2fd0fb0e Mon Sep 17 00:00:00 2001 From: matt Date: Wed, 10 Sep 2025 08:32:59 -0700 Subject: [PATCH] chore(ci): exclude latest-* arch suffix tags from per-arch pushes --- .github/workflows/dockerhub-publish.yml | 28 ++++++++++++++++------- RELEASE_NOTES_TEMPLATE.md | 30 ------------------------- dockerhub-docker-compose.yml | 3 ++- 3 files changed, 22 insertions(+), 39 deletions(-) diff --git a/.github/workflows/dockerhub-publish.yml b/.github/workflows/dockerhub-publish.yml index e427d90..88eea09 100644 --- a/.github/workflows/dockerhub-publish.yml +++ b/.github/workflows/dockerhub-publish.yml @@ -71,7 +71,8 @@ jobs: run: | echo "Generating amd64 tag variants" >&2 TAGS='${{ needs.prepare.outputs.tags }}' - echo "$TAGS" | sed 's/$/-amd64/' | grep . > tags.txt + # Exclude 'latest' so we don't leave latest-amd64 dangling; only final manifest will produce plain 'latest' + echo "$TAGS" | grep -v ':latest$' | sed 's/$/-amd64/' | grep . > tags.txt echo "Computed tags:" >&2; cat tags.txt >&2 echo "tags<> $GITHUB_OUTPUT cat tags.txt >> $GITHUB_OUTPUT @@ -125,6 +126,7 @@ jobs: needs: prepare permissions: contents: read + timeout-minutes: 20 continue-on-error: true steps: - name: Checkout @@ -136,7 +138,8 @@ jobs: run: | echo "Generating arm64 tag variants (native)" >&2 TAGS='${{ needs.prepare.outputs.tags }}' - echo "$TAGS" | sed 's/$/-arm64/' | grep . > tags.txt + # Exclude 'latest' so only final manifest produces plain 'latest' + echo "$TAGS" | grep -v ':latest$' | sed 's/$/-arm64/' | grep . > tags.txt echo "Computed tags:" >&2; cat tags.txt >&2 echo "tags<> $GITHUB_OUTPUT cat tags.txt >> $GITHUB_OUTPUT @@ -168,7 +171,8 @@ jobs: name: Build (arm64 emulated fallback) runs-on: ubuntu-latest needs: [prepare, build_arm64_native] - if: needs.build_arm64_native.result == 'failure' + # Run if native arm64 did NOT succeed (failure, cancelled, or skipped) + if: needs.build_arm64_native.result != 'success' permissions: contents: read steps: @@ -181,7 +185,8 @@ jobs: run: | echo "Generating arm64 tag variants (fallback)" >&2 TAGS='${{ needs.prepare.outputs.tags }}' - echo "$TAGS" | sed 's/$/-arm64/' | grep . > tags.txt + # Exclude 'latest' so only final manifest produces plain 'latest' + echo "$TAGS" | grep -v ':latest$' | sed 's/$/-arm64/' | grep . > tags.txt echo "tags<> $GITHUB_OUTPUT cat tags.txt >> $GITHUB_OUTPUT echo "EOF" >> $GITHUB_OUTPUT @@ -227,13 +232,20 @@ jobs: TAGS: ${{ needs.prepare.outputs.tags }} run: | echo "Creating multi-arch manifests (native preferred, fallback if needed)..." + VERSION_PRIMARY=$(echo "$TAGS" | grep -v ':latest$' | head -n1) echo "$TAGS" | while read -r tag; do [ -z "$tag" ] && continue echo "Processing $tag" - SOURCES="${tag}-amd64" - if docker buildx imagetools inspect "${tag}-arm64" >/dev/null 2>&1; then - echo "Found arm64 image tag: ${tag}-arm64" - SOURCES="$SOURCES ${tag}-arm64" + # For 'latest', reuse the version tag's arch images (we did not push latest-amd64/-arm64) + if [[ "$tag" == *":latest" ]]; then + BASE="$VERSION_PRIMARY" + else + BASE="$tag" + fi + SOURCES="${BASE}-amd64" + if docker buildx imagetools inspect "${BASE}-arm64" >/dev/null 2>&1; then + echo "Found arm64 image tag: ${BASE}-arm64" + SOURCES="$SOURCES ${BASE}-arm64" else echo "No arm64 image found for $tag (skipping arm64 in manifest)" >&2 fi diff --git a/RELEASE_NOTES_TEMPLATE.md b/RELEASE_NOTES_TEMPLATE.md index 5b3af95..d4725f9 100644 --- a/RELEASE_NOTES_TEMPLATE.md +++ b/RELEASE_NOTES_TEMPLATE.md @@ -80,33 +80,3 @@ - Corrected comma parsing that was breaking card names containing commas - Fixed backward compatibility test failures with warning message format standardization - Eliminated debug and emergency logging messages for production readiness - -## Highlights -- Mobile UI polish: collapsible left sidebar with persisted state, sticky controls that respect the header, and banner subtitle that stays inline when the menu is collapsed. -- Multi-Copy is now opt-in from the New Deck modal, and suggestions are filtered to match selected themes (e.g., Rabbit Kindred → Hare Apparent). -- New Deck modal improvements: integrated commander preview, theme selection, and optional Multi-Copy in one flow. - -## What’s new -- Mobile & layout - - Sidebar toggle button (persisted in localStorage), smooth hide/show. - - Sticky build controls offset via CSS variables to avoid overlap in emulators and mobile. - - Banner subtitle stays within the header and remains inline with the title when the sidebar is collapsed. -- Multi-Copy - - Moved to Commander selection now instead of happening during building. - - Opt-in checkbox in the New Deck modal; disabled by default. - - Suggestions only appear when at least one theme is selected and are limited to archetypes whose matched tags intersect the themes. - - Multi-Copy runs first when selected, with an applied marker to avoid redundant rebuilds. -- New Deck & Setup - - Setup/Refresh prompt modal if the environment is missing or stale, with a clear path to run/refresh setup before building. - - Centralized staged context creation and error/render helpers for a more robust Step 5 flow. - -## Notes -- Multi-Copy selection is part of the interactive New Deck modal (not a JSON field); it remains off unless explicitly enabled. -- Setup helpers: `is_setup_ready()` and `is_setup_stale()` inform the modal prompt and can be tuned with `WEB_AUTO_SETUP` and `WEB_AUTO_REFRESH_DAYS`. -- Headless parity: `tag_mode` (AND/OR) remains supported in JSON/env and exported in interactive run-config JSON. - -## Fixes -- Continue responsiveness and click reliability on mobile/emulators; sticky overlap eliminated. -- Multi-Copy application preserved across New Deck submit; duplicate re-application avoided with an applied marker. -- Banner subtitle alignment fixed in collapsed-menu mode (no overhang, no line-wrap into a new row). -- Docker: normalized line endings for entrypoint to avoid Windows checkout issues. \ No newline at end of file diff --git a/dockerhub-docker-compose.yml b/dockerhub-docker-compose.yml index 47a46f6..961fd6f 100644 --- a/dockerhub-docker-compose.yml +++ b/dockerhub-docker-compose.yml @@ -1,6 +1,7 @@ services: web: - image: mwisnowski/mtg-python-deckbuilder:latest + # image: mwisnowski/mtg-python-deckbuilder:latest-arm64 # Use for arm64 + # image: mwisnowski/mtg-python-deckbuilder:latest-amd64 # use for amd64 container_name: mtg-deckbuilder-web ports: - "8080:8080" # Host:Container — open http://localhost:8080