Skip to content

fix: harden major-tag update (release: published)#135

Merged
jmpalomares merged 5 commits into
mainfrom
fix/major-tag-on-tag-push
Jun 11, 2026
Merged

fix: harden major-tag update (release: published)#135
jmpalomares merged 5 commits into
mainfrom
fix/major-tag-on-tag-push

Conversation

@jmpalomares

@jmpalomares jmpalomares commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Problem

The v8 major tag silently fell a release behind after v8.3.8.

ci.update-major-version-tag.yaml triggers on: release: published, but that event is suppressed when the release is published by the default GITHUB_TOKEN (GitHub anti-recursion). The v8.3.8 release was published via automation, so the workflow never ran — leaving v8 pinned to v8.3.7's commit.

Because PR #127 added the timeoutMinutes input to build-image.yaml in v8.3.8, kubernetes.yaml@v8.3.8 forwarding timeoutMinutes to build-image.yaml@v8 (still v8.3.7, no such input) failed validation for every consumer:

Invalid input, timeoutMinutes is not defined in the referenced workflow.

(v8 has already been manually realigned to v8.3.8 to unblock consumers; this PR prevents recurrence.)

Approach

Releases are created/published manually by a human, so the GITHUB_TOKEN suppression does not apply to the normal flow — a person publishing in the UI fires the event reliably. We therefore keep release: published (semantically correct, won't fire on stray tag pushes) and harden the weak parts instead.

Changes

  • Take the version from github.event.release.tag_name instead of the fragile git describe --tags --abbrev=0 topology guess.
  • Enforce strict vX.Y.Z semver and skip pre-releases (github.event.release.prerelease).
  • Add a workflow_dispatch input to realign the major tag by hand if an event is ever missed (the v8.3.8 recovery path).
  • Use an idempotent git tag -f + force-push instead of delete-then-recreate.

Operational note

Publish releases as a human (or PAT), never via the default GITHUB_TOKEN — otherwise the release: published event is suppressed and v8 lags behind again.

The release: published event is suppressed by GITHUB_TOKEN anti-recursion
when a release is published by automation, which left v8 stuck on v8.3.7
after the v8.3.8 release (build-image.yaml@v8 then lacked the timeoutMinutes
input, breaking kubernetes.yaml@v8.3.8 consumers).

Trigger on the semver tag push instead (created only on publish, never on
drafts), derive the version from the pushed ref, and add a workflow_dispatch
recovery lever to realign the major tag manually.
Copilot AI review requested due to automatic review settings June 9, 2026 10:21
@jmpalomares jmpalomares requested a review from a team as a code owner June 9, 2026 10:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the “Update major tag” GitHub Actions workflow so the major tag (e.g. v8) is kept aligned with the latest patch/minor release tag (e.g. v8.3.8), avoiding the release: published event suppression that previously caused v8 to lag behind and break downstream reusable workflow references.

Changes:

  • Switch workflow trigger from release: published to push on semver tags, plus add a manual workflow_dispatch recovery input.
  • Derive the version directly from github.ref_name (or dispatch input) instead of git describe.
  • Update the major tag via git tag -f and a force-push, making the operation idempotent.

Comment thread .github/workflows/ci.update-major-version-tag.yaml Outdated
Comment thread .github/workflows/ci.update-major-version-tag.yaml
Address review feedback:
- on.push.tags uses glob syntax, not regex; v[0-9]+.[0-9]+.[0-9]+ required a
  literal '+' and would never match v8.3.8. Use v[0-9]*.[0-9]*.[0-9]* and
  enforce the exact vX.Y.Z shape in the script (also skips pre-releases).
- push fires on tag deletion too; add a job-level guard so it only runs on
  tag creation or manual dispatch.

@kpplis kpplis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

That event is suppressed by GitHub's GITHUB_TOKEN anti-recursion rule when a release is published by automation, so the workflow never ran for the v8.3.8

I think we should focus on fixing this instead, releases are supposed to be published manually only. We should stick to the release trigger as a more reliable and clear option rather than getting back to tag push trigger.

Keep release: published (releases are created manually by a human, so the
GITHUB_TOKEN suppression does not apply), but harden the weak parts:
- take the version from github.event.release.tag_name instead of fragile
  git describe topology guessing
- enforce strict vX.Y.Z semver and skip pre-releases
- add workflow_dispatch recovery lever to realign the major tag by hand
- idempotent git tag -f + force-push instead of delete-then-recreate
@jmpalomares jmpalomares changed the title fix: update major tag on tag push instead of release published fix: harden major-tag update (release: published) Jun 10, 2026
@jmpalomares jmpalomares requested a review from kpplis June 10, 2026 08:29
@andibeuge

Copy link
Copy Markdown
Contributor

@kpplis @jmpalomares I added the tag push with a regex that should help to trigger

@jmpalomares jmpalomares merged commit 8e458dc into main Jun 11, 2026
5 checks passed
@jmpalomares jmpalomares deleted the fix/major-tag-on-tag-push branch June 11, 2026 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants