From f0f2e5ec2bfb841649efed385b0d9d1bfc63117d Mon Sep 17 00:00:00 2001 From: Jamie Tanna Date: Wed, 22 Apr 2026 09:09:14 +0100 Subject: [PATCH 1/2] fix(versioning/github-actions): treat floating tags as equal As noted in #42662, if a floating tag `@v2` is used, Renovate currently tries to roll it back to `@v1`, as it doesn't see that `@v2 === @v2`. --- lib/modules/versioning/github-actions/index.spec.ts | 4 ++-- lib/modules/versioning/github-actions/index.ts | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/modules/versioning/github-actions/index.spec.ts b/lib/modules/versioning/github-actions/index.spec.ts index c56681491a9..f217d1ab585 100644 --- a/lib/modules/versioning/github-actions/index.spec.ts +++ b/lib/modules/versioning/github-actions/index.spec.ts @@ -108,8 +108,8 @@ describe('modules/versioning/github-actions/index', () => { ${'1.0.0-rc'} | ${'1.0'} | ${false} ${'invalid'} | ${'1'} | ${false} ${'~latest'} | ${'1'} | ${false} - ${'1'} | ${'1'} | ${false} - ${'1.2'} | ${'1.2'} | ${false} + ${'1'} | ${'1'} | ${true} + ${'1.2'} | ${'1.2'} | ${true} ${'1.2.3'} | ${'1.2.3'} | ${true} ${'1.2.4'} | ${'1.2.3'} | ${false} ${'not-semver-ver'} | ${'1'} | ${false} diff --git a/lib/modules/versioning/github-actions/index.ts b/lib/modules/versioning/github-actions/index.ts index 5a6fd144c1c..c3459a2c639 100644 --- a/lib/modules/versioning/github-actions/index.ts +++ b/lib/modules/versioning/github-actions/index.ts @@ -131,6 +131,11 @@ function isGreaterThan(x: string, y: string): boolean { } function matches(version: string, range: string): boolean { + // if we have a valid floating tag provided, and it's the same as the range, treat it as the same + if (parseVersionCoerced(version) && version === range) { + return true; + } + const v = parseVersion(version); if (!v) { return false; From ae5e4e9c8742b26541aa0db2f1355cec1e245a06 Mon Sep 17 00:00:00 2001 From: Jamie Tanna Date: Wed, 22 Apr 2026 10:28:22 +0100 Subject: [PATCH 2/2] fix(versioning/github-actions): allow `v` prefix matching too --- lib/modules/versioning/github-actions/index.spec.ts | 7 ++++++- lib/modules/versioning/github-actions/index.ts | 5 ++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/modules/versioning/github-actions/index.spec.ts b/lib/modules/versioning/github-actions/index.spec.ts index f217d1ab585..60c3605277d 100644 --- a/lib/modules/versioning/github-actions/index.spec.ts +++ b/lib/modules/versioning/github-actions/index.spec.ts @@ -109,8 +109,13 @@ describe('modules/versioning/github-actions/index', () => { ${'invalid'} | ${'1'} | ${false} ${'~latest'} | ${'1'} | ${false} ${'1'} | ${'1'} | ${true} + ${'1'} | ${'v1'} | ${true} + ${'v1'} | ${'v1'} | ${true} + ${'v1'} | ${'1'} | ${true} ${'1.2'} | ${'1.2'} | ${true} - ${'1.2.3'} | ${'1.2.3'} | ${true} + ${'1.2'} | ${'v1.2'} | ${true} + ${'v1.2'} | ${'v1.2'} | ${true} + ${'v1.2'} | ${'1.2'} | ${true} ${'1.2.4'} | ${'1.2.3'} | ${false} ${'not-semver-ver'} | ${'1'} | ${false} ${'1.0.0-alpha'} | ${'1'} | ${false} diff --git a/lib/modules/versioning/github-actions/index.ts b/lib/modules/versioning/github-actions/index.ts index c3459a2c639..65b192806a3 100644 --- a/lib/modules/versioning/github-actions/index.ts +++ b/lib/modules/versioning/github-actions/index.ts @@ -132,7 +132,10 @@ function isGreaterThan(x: string, y: string): boolean { function matches(version: string, range: string): boolean { // if we have a valid floating tag provided, and it's the same as the range, treat it as the same - if (parseVersionCoerced(version) && version === range) { + if ( + parseVersionCoerced(version) && + massageValue(version) === massageValue(range) + ) { return true; }