Skip to content

Commit c8eeab8

Browse files
authored
feat(super-linter): default to slim image (#24)
## Summary - Switch from the full Super-Linter image to the slim variant (~2 GB smaller), which excludes Rust, .NET/C#, PowerShell, and ARM template linters most consuming repos don't need - Add a `packageRules` entry to the Renovate preset (`default.json`) and flint's own `renovate.json5` that applies regex versioning when the current value starts with `slim-` — this teaches Renovate how to parse `slim-v8.4.0` style tags. The rule only activates for slim tags, so repos using the full image are unaffected (backwards compatible) - Document the slim vs full image choice in README ## Test plan - [x] Run `mise run lint:super-linter` locally — confirm it pulls the slim image - [ ] Run `mise run fix` — confirm autofix works with slim image - [ ] Verify a consuming repo can override to full image by setting `SUPER_LINTER_VERSION` to a non-prefixed tag - [ ] Verify Renovate can parse the slim tag and propose updates Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
1 parent 4622dc8 commit c8eeab8

File tree

4 files changed

+28
-5
lines changed

4 files changed

+28
-5
lines changed

.github/renovate.json5

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,12 @@
2323
matchStrings: ['# renovate: datasource=(?<datasource>[a-z-]+?)(?: depName=(?<depName>.+?))?(?: packageName=(?<packageName>.+?))?(?: versioning=(?<versioning>[a-z-]+?))?\\s.+?_VERSION="?(?<currentValue>[^@"]+?)(?:@(?<currentDigest>sha256:[a-f0-9]+))?"?\\s'],
2424
},
2525
],
26+
packageRules: [
27+
{
28+
matchPackageNames: ["ghcr.io/super-linter/super-linter"],
29+
matchCurrentValue: "/^slim-/",
30+
description: "Use regex versioning for slim Super-Linter tags (slim-v8.4.0)",
31+
versioning: "regex:^slim-v(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)$",
32+
},
33+
],
2634
}

README.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,15 @@ controls which Super-Linter image is pulled. **Renovate**, via the
130130
flint preset, opens PRs to bump both the flint script URL and the
131131
`SUPER_LINTER_VERSION` value when new versions are available.
132132

133+
**Slim vs full image:** Super-Linter publishes a slim image
134+
(`slim-v8.4.0`) that is ~2 GB smaller than the full image. The slim
135+
image excludes Rust, .NET/C#, PowerShell, and ARM template linters.
136+
Flint defaults to the slim image. To use the full image instead, set
137+
`SUPER_LINTER_VERSION` to the non-prefixed tag (e.g.
138+
`v8.4.0@sha256:...`) and update the Renovate `depName` comment
139+
accordingly (drop the `versioning` override so Renovate uses standard
140+
Docker versioning).
141+
133142
**Flags:**
134143

135144
| Flag | Description |
@@ -143,10 +152,10 @@ the env file before running Super-Linter.
143152

144153
<!-- editorconfig-checker-disable -->
145154

146-
| Variable | Default | Required | Description |
147-
| ----------------------- | --------------------------------- | -------- | ------------------------------------------------- |
148-
| `SUPER_LINTER_VERSION` || yes | Super-Linter image tag (e.g. `v8.4.0@sha256:...`) |
149-
| `SUPER_LINTER_ENV_FILE` | `.github/config/super-linter.env` | no | Path to the Super-Linter env file |
155+
| Variable | Default | Required | Description |
156+
| ----------------------- | --------------------------------- | -------- | --------------------------------------------------------------------------------------------- |
157+
| `SUPER_LINTER_VERSION` || yes | Super-Linter image tag (e.g. `slim-v8.4.0@sha256:...` for slim, `v8.4.0@sha256:...` for full) |
158+
| `SUPER_LINTER_ENV_FILE` | `.github/config/super-linter.env` | no | Path to the Super-Linter env file |
150159

151160
<!-- editorconfig-checker-enable -->
152161

default.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@
2525
"matchPackageNames": ["renovate"],
2626
"description": "Only update renovate once a week",
2727
"schedule": ["before 6am on Monday"]
28+
},
29+
{
30+
"matchPackageNames": ["ghcr.io/super-linter/super-linter"],
31+
"matchCurrentValue": "/^slim-/",
32+
"description": "Use regex versioning for slim Super-Linter tags (slim-v8.4.0)",
33+
"versioning": "regex:^slim-v(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)$"
2834
}
2935
]
3036
}

mise.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ node = "24.13.1"
66
[env]
77
RENOVATE_TRACKED_DEPS_EXCLUDE="github-actions,github-runners"
88
# renovate: datasource=docker depName=ghcr.io/super-linter/super-linter
9-
SUPER_LINTER_VERSION="v8.4.0@sha256:c5e3307932203ff9e1e8acfe7e92e894add6266605b5d7fb525fb371a59a26f4"
9+
SUPER_LINTER_VERSION="slim-v8.4.0@sha256:8421cd4687937ac32a829539d03de51a147c164b42842cbfb20aada83ce1bb0c"
1010

1111
# Dogfood our own lint tasks - use local file paths
1212
[tasks."lint:super-linter"]

0 commit comments

Comments
 (0)