Upgrade Java container images in YAML
MSALUpgrade the Java version of the container image references found at a JsonPath in YAML files, as by UpgradeDockerImageVersion. Deprecated openjdk images move to eclipse-temurin, while images that are not Java images, and images already at or beyond the target version, are left untouched.
org. openrewrite. java. migrate. UpgradeJavaContainerImageRequired
The Java version to upgrade to.
A glob expression matching the YAML files holding the image references. Multiple patterns may be separated by a semicolon ;.
A JsonPath expression matching the image references, either as a plain reference or as a mapping holding the reference under name.
mod run . --recipe= org. openrewrite. java. migrate. UpgradeJavaContainerImage \
-P version=25 \
-P filePattern= '. github/ workflows/ *. yml;. github/ workflows/ *. yaml' \
-P jsonPath= '$. jobs. *. container. image'Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.