Skip to content

Enhance Docker release workflow for multi-arch support#75

Merged
JaredHatfield merged 3 commits intomainfrom
multi-arch
Mar 29, 2026
Merged

Enhance Docker release workflow for multi-arch support#75
JaredHatfield merged 3 commits intomainfrom
multi-arch

Conversation

@JaredHatfield
Copy link
Copy Markdown
Member

Updated the GitHub Actions workflow to support multi-architecture builds and added concurrency management.

Updated the GitHub Actions workflow to support multi-architecture builds and added concurrency management.
Comment thread .github/workflows/release-docker-ghcr.yml Fixed
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (fb5626f) to head (c5a6346).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@          Coverage Diff          @@
##            main     #75   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files          1       1           
  Lines         17      17           
=====================================
  Misses        17      17           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Docker release workflow to build and publish per-architecture images and then assemble/push a multi-arch manifest, adding repo-level concurrency control to manage overlapping Docker publish runs.

Changes:

  • Convert the release Docker job to a matrix build (amd64/arm64) and publish arch-specific tags.
  • Add a follow-up job to create/push a multi-arch manifest from the arch images.
  • Move concurrency control to the workflow level.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

types: [published]

concurrency:
group: docker
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

concurrency.group is set to a constant (docker). Concurrency groups are global across the repo, so this will also serialize/queue runs from other workflows that use the same group (e.g., the dev Docker workflow), potentially delaying releases. Consider scoping the group to this workflow (and optionally the ref), e.g. ${{ github.workflow }}-${{ github.ref }} (and decide explicitly whether to set cancel-in-progress).

Suggested change
group: docker
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

Copilot uses AI. Check for mistakes.
Comment on lines +122 to +133
TAGS: ${{ steps.meta.outputs.tags }}
run: |
IMAGE="ghcr.io/${REPO_LC}"
VERSION="${GITHUB_REF_NAME}"

TAG_ARGS=""
while IFS= read -r tag; do
[ -n "${tag}" ] && TAG_ARGS="${TAG_ARGS} -t ${tag}"
done <<< "${TAGS}"

docker buildx imagetools create \
${TAG_ARGS} \
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The build job’s tags are generated with pattern=v{{version}} (forcing a v prefix), but the manifest job later assumes the arch images are tagged as ${GITHUB_REF_NAME}-<arch>. If a release tag is 1.2.3 (no v), the build will push v1.2.3-amd64/arm64 while the manifest job will try to reference 1.2.3-amd64/arm64 and fail. Consider deriving the base version/tag consistently (e.g., from docker/metadata-action outputs) or removing the hard-coded v prefix from the patterns.

Copilot uses AI. Check for mistakes.
"${IMAGE}:${VERSION}-amd64" \
"${IMAGE}:${VERSION}-arm64"

docker buildx imagetools inspect "${IMAGE}:${VERSION}"
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Digest extraction for the manifest is done by grepping/awking the human-readable output of docker buildx imagetools inspect, and grep -m1 can pick up the wrong digest if multiple Digest: lines are present (per-platform entries) or if the CLI output format changes. Prefer a machine-readable output/format flag (if available) and avoid parsing with grep|awk for correctness and long-term stability.

Suggested change
docker buildx imagetools inspect "${IMAGE}:${VERSION}"
DIGEST=$(docker buildx imagetools inspect "${IMAGE}:${VERSION}" --format '{{json .}}' | jq -r '.Digest')

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/release-docker-ghcr.yml
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +138 to +139
DIGEST=$(docker buildx imagetools inspect "${IMAGE}:${META_VERSION}" --format '{{json .}}' | jq -r '.Digest')
echo "digest=${DIGEST}" >> $GITHUB_OUTPUT
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The manifest job extracts the digest by piping JSON into jq, which introduces an extra tool dependency and can silently produce an empty/"null" digest if the format ever changes. Prefer using docker buildx imagetools inspect --format '{{.Digest}}' (or another Buildx-native format) and failing the step if the digest is empty before writing to $GITHUB_OUTPUT.

Suggested change
DIGEST=$(docker buildx imagetools inspect "${IMAGE}:${META_VERSION}" --format '{{json .}}' | jq -r '.Digest')
echo "digest=${DIGEST}" >> $GITHUB_OUTPUT
DIGEST=$(docker buildx imagetools inspect "${IMAGE}:${META_VERSION}" --format '{{.Digest}}')
if [ -z "${DIGEST}" ] || [ "${DIGEST}" = "null" ]; then
echo "Failed to determine image digest for ${IMAGE}:${META_VERSION}" >&2
exit 1
fi
echo "digest=${DIGEST}" >> "$GITHUB_OUTPUT"

Copilot uses AI. Check for mistakes.
@JaredHatfield JaredHatfield merged commit f873d2e into main Mar 29, 2026
9 checks passed
@JaredHatfield JaredHatfield deleted the multi-arch branch March 29, 2026 15:53
@github-project-automation github-project-automation bot moved this from Todo to Done in UnitVectorY Labs Mar 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants