Skip to content

Fix "Build containers" CI failure when repository has no git tags#2

Draft
bramhanandlingala with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-build-containers-job
Draft

Fix "Build containers" CI failure when repository has no git tags#2
bramhanandlingala with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-build-containers-job

Conversation

Copilot AI commented Jul 14, 2026

Copy link
Copy Markdown

git describe --tags --match 'v*' exits with code 128 ("No names found, cannot describe anything") on repos without tags. With -Eeuo pipefail active, this kills the Build meta step, leaving VERSION unset and causing a downstream JSON parse error when the workflow tries to read bake metadata.

Changes

  • .github/workflows/continuous-integration.yml: Make git describe non-fatal when no tags exist
    • Redirect stderr to /dev/null and append || true to the pipeline
    • Fall back to 0.0.0-dev when commit_version resolves to empty
-commit_version=$(git describe --tags --match 'v*' "${commit_sha}"| sed -e 's/^v//; ...')
+commit_version=$(git describe --tags --match 'v*' "${commit_sha}" 2>/dev/null | sed -e 's/^v//; ...' || true)
+if [[ -z "${commit_version}" ]]; then
+  commit_version="0.0.0-dev"
+fi

Consistent with the existing || : guard already used on the git log line directly above.

Copilot AI changed the title [WIP] Fix failing GitHub Actions job Build containers Fix "Build containers" CI failure when repository has no git tags Jul 14, 2026
Copilot AI requested a review from bramhanandlingala July 14, 2026 06:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants