Commit Graph

14 Commits

Author SHA1 Message Date
Jamie Tanna 9303449af1 fix(manager/github-actions): treat setup-beam's versions as ranges
While looking at the fix for `actions/setup-java`, we noticed that
`erlef/setup-beam` may also be affected, as it notes:

> values like `22.x`, or even `>22`, are also accepted, and we attempt
> to resolve them according to semantic versioning rules

As these fall back to `semver-coerced`, Renovate then raises a PR
rewriting the range into a full version, which isn't the intent.

We can use `npm` versioning for the Elixir, Gleam and rebar3
dependencies.

This deliberately leaves `otp-version` alone: Erlang/OTP releases
4-component versions (e.g. `26.2.5.3`) which aren't valid semver, so
`npm` versioning would discard those releases entirely. Resolving that
needs a versioning which handles both the 4-component versions and the
ranges, which is left as a follow-up.

Co-authored-by: Claude Opus 5 <jamie.tanna+claude-code@mend.io>
2026-09-16 14:14:43 +01:00
Jamie Tanna 71f67417b7 fix(manager/github-actions): don't pin partial golangci-lint versions
While looking at the fix for `actions/setup-java`, we noticed that
`golangci/golangci-lint-action` may also be affected, as it notes for
its default `binary` install mode:

> the value can be v2.3, v2.3.4, or `latest` to use the latest version.

As the value falls back to `semver-coerced`, `v2.3` is treated as a
pinned version, so Renovate then raises a PR to bump to a full version,
which isn't the intent.

Unlike the other Actions looked at here, the partial versions are
`v`-prefixed, so we need to widen the partial-version check to allow
that. `semver-partial` versioning preserves the prefix, so `v2.5` is
bumped to `v2.6` rather than to a full `v2.6.0`.

Co-authored-by: Claude Opus 5 <jamie.tanna+claude-code@mend.io>
2026-09-16 14:14:43 +01:00
Jamie Tanna db9e8bc1a0 fix(manager/github-actions): don't pin partial install-crystal versions
While looking at the fix for `actions/setup-java`, we noticed that
`crystal-lang/install-crystal` may also be affected, as it notes for
both its `crystal` and `shards` inputs:

> Install a particular release of Crystal (if the full version is
> specified), or the latest patch version of a release series.

As these fall back to `semver-coerced`, a partial version such as `1.21`
is treated as a pinned version, so Renovate then raises a PR to bump to
a full version, which isn't the intent.

We can reuse the same `semver-partial` handling to keep the value's
precision.

Co-authored-by: Claude Opus 5 <jamie.tanna+claude-code@mend.io>
2026-09-16 14:14:43 +01:00
Jamie Tanna 5a34d96074 fix(manager/github-actions): don't pin partial swift-versions
While looking at the fix for `actions/setup-java`, we noticed that
`swift-actions/setup-swift` may also be affected, as it notes:

> YAML interprets eg. 5.0 as a float, this action will then interpret
> that as 5 which will result in eg. Swift 5.5 being resolved.

As the value falls back to `semver-coerced`, a partial `swift-version`
is treated as a pinned version, so Renovate then raises a PR to bump to
a full version, which isn't the intent.

Unlike the other Actions looked at here, no ranges are documented, so
`semver-partial` versioning is enough to keep a partial version's
precision.

Co-authored-by: Claude Opus 5 <jamie.tanna+claude-code@mend.io>
2026-09-16 14:14:43 +01:00
Jamie Tanna e650960c18 fix(manager/github-actions): treat GitVersion's versionSpec as a range
While looking at the fix for `actions/setup-java`, we noticed that
`GitTools/actions/gitversion/setup` may also be affected, as it
documents `versionSpec` as:

> Required version in the form of 6.8.x or exact version like 6.0.0.

with its own examples using the `6.8.x` form throughout.

As the value falls back to `semver-coerced`, Renovate then raises a PR
rewriting `6.8.x` into a full version, which isn't the intent.

We can use `npm` versioning here too.

Co-authored-by: Claude Opus 5 <jamie.tanna+claude-code@mend.io>
2026-09-16 14:14:43 +01:00
Jamie Tanna 88303b26b0 fix(manager/github-actions): treat flutter-version as a range
While looking at the fix for `actions/setup-java`, we noticed that
`subosito/flutter-action` may also be affected. It doesn't describe
`flutter-version` in prose, but its examples use x-ranges to pick the
latest release of a line:

> flutter-version: 1.22.x
> flutter-version: 3.x

As these fall back to `semver-coerced`, Renovate then raises a PR
rewriting `3.24.x` into a full version, which isn't the intent.

We can use `npm` versioning here too.

Co-authored-by: Claude Opus 5 <jamie.tanna+claude-code@mend.io>
2026-09-16 14:14:43 +01:00
Jamie Tanna 231c3e617f fix(manager/github-actions): treat cmake-version as a range
While looking at the fix for `actions/setup-java`, we noticed that
`jwlawson/actions-setup-cmake` may also be affected, as it notes:

> This can be a fully specified verison `3.3.0`, partly specified `3.2`,
> a wildcard version `3.2.x`.

As the value falls back to `semver-coerced`, Renovate then raises a PR
rewriting `3.2.x` into a full version, which isn't the intent.

We can use `npm` versioning here too, which understands both the partly
specified and the wildcard forms.

Co-authored-by: Claude Opus 5 <jamie.tanna+claude-code@mend.io>
2026-09-16 14:14:43 +01:00
Jamie Tanna 219c8f718e fix(manager/github-actions): treat Terraform/OpenTofu versions as constraints
While looking at the fix for `actions/setup-java`, we noticed that
`hashicorp/setup-terraform` and `opentofu/setup-opentofu` may also be
affected, as both note:

> Instead of a full version string, you can also specify a constraint
> string (see Semver Ranges for available range specifications).

As these fall back to `semver-coerced`, which coerces `~1.1.0` to
`1.1.0`, Renovate then raises a PR rewriting the constraint into a full
version, which isn't the intent.

We can use `npm` versioning, which handles the constraint strings the
Actions document, and leaves `latest` alone as a value we have no
version to bump it to.

Co-authored-by: Claude Opus 5 <jamie.tanna+claude-code@mend.io>
2026-09-16 14:14:43 +01:00
Jamie Tanna 08d11825c8 fix(manager/github-actions): treat setup-julia's version as a range
While looking at the fix for `actions/setup-java`, we noticed that
`julia-actions/setup-julia` may also be affected, as it notes:

> Internally the action uses node's semver package to resolve version
> ranges.

Its documented values therefore include `1.0`, which "matches the
highest available version starting with that prefix", as well as
`^1.3.0-rc1` and `~1.3.0-rc1`.

As these fall back to `semver-coerced`, Renovate then raises a PR to
bump `1.10` to the full-precision tag `v1.11.7`, which isn't the intent.

We can instead use `npm` versioning, as we already do for
`goreleaser/goreleaser-action` and `j178/prek-action`.

Co-authored-by: Claude Opus 5 <jamie.tanna+claude-code@mend.io>
2026-09-16 14:14:43 +01:00
Jamie Tanna fe649335ce fix(manager/github-actions): treat dotnet-version as a range
While looking at the fix for `actions/setup-java`, we noticed that
`actions/setup-dotnet` may also be affected, as it notes:

> - **A.B** or **A.B.x** installs the latest patch version of .NET SDK
>   on the channel
> - **A** or **A.x** installs the latest minor version of the specified
>   major tag

alongside `A.B.Cxx` for "the latest version of the specific SDK release"
and `latest` for "the highest active .NET SDK version".

As these fall back to `semver-coerced`, which happily coerces `8.0.x` to
`8.0.0`, Renovate then raises a PR to bump to a full version such as
`9.0.100`, which isn't the intent.

Rather than the `semver-partial` versioning used for the other Actions,
here we can use `npm` versioning, which understands the x-range form
too, and safely rejects `8.0.4xx`/`latest` as values we have no version
to bump them to.

Co-authored-by: Claude Opus 5 <jamie.tanna+claude-code@mend.io>
2026-09-16 14:14:43 +01:00
Jamie Tanna 71aa945494 fix(manager/github-actions): don't pin partial setup-dart SDK versions
While looking at the fix for `actions/setup-java`, we noticed that
`dart-lang/setup-dart` may also be affected, as it notes:

> An SDK release version - e.g. `2.19` or `3.1`. This will install the
> latest patch release for that specific release version.

As the `sdk` value falls back to `semver-coerced`, `3.5` is treated as a
pinned version, so Renovate then raises a PR to bump to a full version
such as `3.9.5`, which isn't the intent.

We can reuse the same `semver-partial` handling to keep the value's
precision.

Co-authored-by: Claude Opus 5 <jamie.tanna+claude-code@mend.io>
2026-09-16 14:14:43 +01:00
Jamie Tanna e0a77f8121 fix(manager/github-actions): don't pin partial ruby-versions
While looking at the fix for `actions/setup-java`, we noticed that the
`ruby/setup-ruby` may also be affected, as it notes:

> short version like '2.6', automatically using the latest release
> matching that version

As Ruby versioning treats `3.4` as a pinned version rather than a range,
we'd propose a patch upgrade rewriting it to `3.4.7`, losing the rolling
behaviour the workflow asked for.

We can reuse the `semver-partial` handling as a `partialValSchema`
helper, so short versions keep their precision and only exact versions
are looked up as pinned.

Co-authored-by: Claude Opus 5 <jamie.tanna+claude-code@mend.io>
2026-09-16 14:14:43 +01:00
Jamie Tanna 967f480f6d fix(manager/github-actions): don't pin partial java-versions
As noted in #46249, `actions/setup-java` documents `java-version` as:

> Java version to install. Supports whole versions, semver ranges,
> early-access versions, and latest.

When the Java version is parsed using the versioning in
`workarounds:javaLTSVersions`, this leads to `11` looking older than
`11.0.32+101`, so Renovate then raises a PR to bump to a full version,
which isn't the intent.

Similar to the fix for mise in
5f5e58b822, we can use `semver-partial`
versioning for whole versions, so `11` stays `11` and only a new major
bumps it to `25`, and exempt `github-actions` from the preset rule that
would otherwise force the Java regex versioning back on.

The remaining documented forms (`21.x`, `>=21`, `21-ea`, `latest`) have
no version we could bump them to, so we skip them as
`unsupported-version` rather than mangling them.

`graalvm/setup-graalvm` reads the same datasource from its own
`java-version` input, so it gets the same treatment.

Co-authored-by: Claude Opus 5 <jamie.tanna+claude-code@mend.io>
2026-09-16 14:14:43 +01:00
Jamie Tanna 2b84f8c13d refactor(manager/github-actions): restructure directory for known-actions (#46248)
As noted in #46242, the `known-actions.ts` file was getting a bit big.

Where we have dynamic extractions, using `transform`, we split these
into a `<datasource>-dynamic.ts` file.

Where we have multiple packages extracted from the same Action, we use
`multiple.ts`.

Per suggestion from Sebastian, we can break this down by the datasource
used by the Action's inputs.

We can also try to enforce the structure of the directories by adding a
test in each file.

Co-authored-by: Claude Sonnet 5 <jamie.tanna+claude-code@mend.io>
2026-09-16 11:40:35 +00:00