Commit b2085791 authored by Louis Gesbert's avatar Louis Gesbert
Browse files

Automatically use latest opam release

parent e9adfb0b
Pipeline #12410 failed with stages
in 17 seconds
......@@ -7,6 +7,10 @@ make-targets:
| jq -r 'map(.tag_name | split(".") | {"maj":.[0:2], "pat":.}) | group_by(.maj) | .[] | max | .pat | join(".")'
| tail -n +3
> versions
- curl https://api.github.com/repos/ocaml/opam/releases
| jq -r 'map(.tag_name | split(".") | {"maj":.[0:2], "pat":.}) | group_by(.maj) | .[] | max | .pat | join(".")'
| tail -n 1
> opam-version
- |
{ for v in $(cat versions); do
echo "ocaml-image-$v:";
......@@ -15,8 +19,9 @@ make-targets:
echo " OCAML_VERSION: $v";
echo;
done;
echo "variables:"
echo "variables:";
echo " LATEST_OCAML_VERSION: $(tail -n1 versions)";
echo " OPAM_VERSION: $(cat opam-version)";
} > ocaml-images.yml
artifacts:
paths:
......
......@@ -21,6 +21,7 @@
- /kaniko/executor --cache=true
--context=$CI_PROJECT_DIR
--dockerfile=$CI_PROJECT_DIR/Dockerfile
--build-arg=OPAM_VERSION=$OPAM_VERSION
--build-arg=OCAML_VERSION=$OCAML_VERSION
--build-arg=LAST_REPO_UPDATE=$(date +%s)
--destination=$CI_REGISTRY_IMAGE:${OCAML_VERSION}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment