Skip to content

ci: handle missing git tags in Build meta step#1

Draft
bramhanandlingala with Copilot wants to merge 3 commits into
mainfrom
copilot/fix-github-actions-build-containers
Draft

ci: handle missing git tags in Build meta step#1
bramhanandlingala with Copilot wants to merge 3 commits into
mainfrom
copilot/fix-github-actions-build-containers

Conversation

Copilot AI commented Jul 7, 2026

Copy link
Copy Markdown

git describe --tags --match 'v*' exits with code 128 when no matching tags exist (e.g. in a fork without version tags). Since the shell runs with -Eeuo pipefail, this kills the entire "Build meta" step before any subsequent steps can run.

Change

Added a || echo "0.0.0-dev" fallback so the step completes successfully when no version tags are present:

# Before
commit_version=$(git describe --tags --match 'v*' "${commit_sha}" | sed ...)

# After
commit_version=$(git describe --tags --match 'v*' "${commit_sha}" 2>/dev/null | sed ... || echo "0.0.0-dev")

When tags are present the behavior is unchanged; when they are absent the version resolves to 0.0.0-dev instead of crashing the job.

haritejakallam99 and others added 2 commits July 7, 2026 11:37
By changing the query from issue has been resolved cloudnative-pg#11129
Copilot AI changed the title [WIP] Fix failing GitHub Actions job Build containers ci: handle missing git tags in Build meta step Jul 7, 2026
Copilot AI requested a review from bramhanandlingala July 7, 2026 06:12
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

Warning

Linked issue missing.

Reference one in the PR body using a keyword (Closes / Fixes / Resolves / Refs / See) followed by #<issue_id> or owner/repo#<issue_id>.

Alternatively, apply the no-issue label to skip this check.

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.

3 participants