make-targets: stage: .pre image: alpine:3.11 script: - apk add curl jq - curl https://api.github.com/repos/ocaml/ocaml/releases | jq -r 'map(.tag_name | split(".") | {"maj":.[0:2], "pat":.}) | group_by(.maj) | .[] | max | .pat | join(".")' | tail -n +3 > versions - sed "s/%LATEST_OCAML_VERSION%/$(tail -n1 versions)/g" ocaml-image.yml.pre > ocaml-images.yml - for v in $(cat versions); do sed "s/%OCAML_VERSION%/$v/g" ocaml-image.yml.in >> ocaml-images.yml; done artifacts: paths: - ocaml-images.yml build-images: stage: build trigger: include: - artifact: ocaml-images.yml job: make-targets strategy: depend only: - master