Skip to content

ci: keep the major version tag pointing at the latest release - #17

Merged
dekelattias-orca merged 1 commit into
masterfrom
ci/auto-update-major-tag
Nov 8, 2026
Merged

dekelattias-orca merged 1 commit into
masterfrom
ci/auto-update-major-tag

Conversation

@dekelattias-orca

Copy link
Copy Markdown
Contributor

Why

The floating v1 tag is what this repo's README tells users to pin to, but nothing moves it — it has to be done by hand after each release.

In orcasecurity/shiftleft-sast-action that step was missed on four consecutive releases and v1 sat on a February build for nine months, until a customer noticed their workflows were not picking up fixes. This repo is currently in sync (v1 -> 11731c5b = v1.0.6, Sep 2026), so this is preventative, not a fix.

Same fix as orcasecurity/shiftleft-sast-action#26.

Change

Adds .github/workflows/update-major-tag.yml, which re-points the major tag at the newest release:

  • release: released — moves v1 to the published vMAJOR.MINOR.PATCH tag automatically. released does not fire for pre-releases, so a pre-release can never move v1.
  • workflow_dispatch — moves it on demand; optional tag input, falls back to the latest release. Passing an older tag rolls v1 back.

Guards: a concurrency group so two releases published close together can't race on the force-push; tags that aren't vMAJOR.MINOR.PATCH are skipped with a warning; the major is derived from the release tag, so a future v2 works unchanged.

The tag stays annotated. Needs contents: write. The only action used is actions/checkout, pinned to the same SHA already used by this repo's other workflows.

Verification

YAML parses and the tag-resolution logic was exercised locally. The workflow itself has not been executed — workflow_dispatch only appears once the file is on the default branch, and the release path needs a real release. After merging, run it once manually from the Actions tab: it will be a no-op on content, but it proves contents: write is sufficient and that no tag ruleset blocks the force-push.

Caveat

If a ruleset is ever added over refs/tags/v*, this push will fail unless the ruleset grants the workflow a bypass. There's a comment in the file to make that easy to trace.

@orca-security-eu orca-security-eu Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Vulnerabilities high 0   medium 0   low 0   info 0 View in Orca

@sonarqubecloud

sonarqubecloud Bot commented Nov 8, 2026

Copy link
Copy Markdown

@guydanko-orca guydanko-orca left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM. Matches the workflow merged in orcasecurity/shiftleft-sast-action#26.

@dekelattias-orca
dekelattias-orca merged commit 85130b8 into master Nov 8, 2026
12 checks passed
@dekelattias-orca
dekelattias-orca deleted the ci/auto-update-major-tag branch November 8, 2026 13:58
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