From 396b615f7d4d6555b007ca91a523b3895c6f24b4 Mon Sep 17 00:00:00 2001 From: Erik Martin-Dorel Date: Tue, 2 Sep 2025 21:23:58 +0200 Subject: [PATCH 1/3] ci(release.yml): Build and push images for amd64 and arm64/v8 Just amounts to porting the following patches: - af5b77a - 7ba32cd - 3431025 Close #626 --- .github/workflows/release.yml | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 427be757..924f5557 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -99,12 +99,15 @@ jobs: id: tag - name: Check out the repo uses: actions/checkout@v4 + - name: Setup QEMU + uses: docker/setup-qemu-action@v3 + with: + platforms: "all" - name: Set up Docker Buildx - # cf. https://github.com/docker/buildx/blob/master/docs/reference/buildx_build.md#image - # and https://docs.docker.com/engine/reference/commandline/buildx_create/#driver + # cf. https://docs.docker.com/reference/cli/docker/buildx/create/#docker-container-driver uses: docker/setup-buildx-action@v3 with: - driver: "docker" + driver: "docker-container" - name: Login to Docker Hub uses: docker/login-action@v3 with: @@ -124,6 +127,7 @@ jobs: tags: | ocamlsf/learn-ocaml:latest ocamlsf/learn-ocaml:${{ steps.tag.outputs.tag }} + platforms: "linux/amd64,linux/arm64/v8" labels: | org.opencontainers.image.title=learn-ocaml org.opencontainers.image.description=learn-ocaml app manager @@ -144,12 +148,15 @@ jobs: id: tag - name: Check out the repo uses: actions/checkout@v4 + - name: Setup QEMU + uses: docker/setup-qemu-action@v3 + with: + platforms: "all" - name: Set up Docker Buildx - # cf. https://github.com/docker/buildx/blob/master/docs/reference/buildx_build.md#image - # and https://docs.docker.com/engine/reference/commandline/buildx_create/#driver + # cf. https://docs.docker.com/reference/cli/docker/buildx/create/#docker-container-driver uses: docker/setup-buildx-action@v3 with: - driver: "docker" + driver: "docker-container" - name: Login to Docker Hub uses: docker/login-action@v3 with: @@ -171,6 +178,7 @@ jobs: tags: | ocamlsf/learn-ocaml-client:latest ocamlsf/learn-ocaml-client:${{ steps.tag.outputs.tag }} + platforms: "linux/amd64,linux/arm64/v8" labels: | org.opencontainers.image.title=learn-ocaml-client org.opencontainers.image.description=learn-ocaml command-line client @@ -193,12 +201,15 @@ jobs: id: tag - name: Check out the repo uses: actions/checkout@v4 + - name: Setup QEMU + uses: docker/setup-qemu-action@v3 + with: + platforms: "all" - name: Set up Docker Buildx - # cf. https://github.com/docker/buildx/blob/master/docs/reference/buildx_build.md#image - # and https://docs.docker.com/engine/reference/commandline/buildx_create/#driver + # cf. https://docs.docker.com/reference/cli/docker/buildx/create/#docker-container-driver uses: docker/setup-buildx-action@v3 with: - driver: "docker" + driver: "docker-container" - name: Login to Docker Hub uses: docker/login-action@v3 with: @@ -222,6 +233,7 @@ jobs: tags: | ocamlsf/emacs-learn-ocaml-client:latest ocamlsf/emacs-learn-ocaml-client:${{ steps.tag.outputs.tag }} + platforms: "linux/amd64,linux/arm64/v8" labels: | org.opencontainers.image.title=learn-ocaml-client with emacs org.opencontainers.image.description=learn-ocaml command-line client with emacs From 0887813a819bd307d8b2a080b315c174228ff6ad Mon Sep 17 00:00:00 2001 From: Erik Martin-Dorel Date: Tue, 2 Sep 2025 22:44:37 +0200 Subject: [PATCH 2/3] chore: Update e-mail addresses --- learn-ocaml-client.opam | 4 ++-- learn-ocaml-client.opam.locked | 4 ++-- learn-ocaml.opam | 4 ++-- learn-ocaml.opam.locked | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/learn-ocaml-client.opam b/learn-ocaml-client.opam index dbdce6cd..47632147 100644 --- a/learn-ocaml-client.opam +++ b/learn-ocaml-client.opam @@ -9,9 +9,9 @@ authors: [ "Pierrick Couderc (OCamlPro)" ] maintainer: [ - "Érik Martin-Dorel " + "Érik Martin-Dorel " "Yann Régis-Gianas " - "Louis Gesbert " + "Louis Gesbert " ] license: "MIT" homepage: "https://github.com/ocaml-sf/learn-ocaml" diff --git a/learn-ocaml-client.opam.locked b/learn-ocaml-client.opam.locked index f88d44f7..c314ddf8 100644 --- a/learn-ocaml-client.opam.locked +++ b/learn-ocaml-client.opam.locked @@ -6,9 +6,9 @@ description: """\ This contains the binaries to interact with the learn-ocaml platform from the command line.""" maintainer: [ - "Érik Martin-Dorel " + "Érik Martin-Dorel " "Yann Régis-Gianas " - "Louis Gesbert " + "Louis Gesbert " ] authors: [ "Benjamin Canou (OCamlPro)" diff --git a/learn-ocaml.opam b/learn-ocaml.opam index b50654ae..2668d95c 100644 --- a/learn-ocaml.opam +++ b/learn-ocaml.opam @@ -9,9 +9,9 @@ authors: [ "Pierrick Couderc (OCamlPro)" ] maintainer: [ - "Érik Martin-Dorel " + "Érik Martin-Dorel " "Yann Régis-Gianas " - "Louis Gesbert " + "Louis Gesbert " ] license: "MIT" homepage: "https://github.com/ocaml-sf/learn-ocaml" diff --git a/learn-ocaml.opam.locked b/learn-ocaml.opam.locked index d3ed1129..8272ebdb 100644 --- a/learn-ocaml.opam.locked +++ b/learn-ocaml.opam.locked @@ -6,9 +6,9 @@ description: """\ This contains the binaries forming the engine for the learn-ocaml platform, and the common files. A demo exercise repository is also provided as example.""" maintainer: [ - "Érik Martin-Dorel " + "Érik Martin-Dorel " "Yann Régis-Gianas " - "Louis Gesbert " + "Louis Gesbert " ] authors: [ "Benjamin Canou (OCamlPro)" From d7f78c700a0113b60ef20e1b28e15987e0216e2a Mon Sep 17 00:00:00 2001 From: Erik Martin-Dorel Date: Sun, 7 Sep 2025 23:27:17 +0200 Subject: [PATCH 3/3] ci(gha): Enable gha cache (mode=min) in `docker/build-push-action` Related: https://github.com/ocaml-sf/learn-ocaml/issues/627#issuecomment-3246589473 --- .github/workflows/deploy-master.yml | 4 ++++ .github/workflows/release.yml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/.github/workflows/deploy-master.yml b/.github/workflows/deploy-master.yml index 52d860c4..24ad2347 100644 --- a/.github/workflows/deploy-master.yml +++ b/.github/workflows/deploy-master.yml @@ -40,6 +40,8 @@ jobs: with: pull: true push: true + cache-from: "type=gha" + cache-to: "type=gha,mode=min" tags: "ocamlsf/learn-ocaml:master" platforms: "linux/amd64,linux/arm64/v8" labels: | @@ -84,6 +86,8 @@ jobs: pull: true # load: true # implied by "driver: docker" push: true + cache-from: "type=gha" + cache-to: "type=gha,mode=min" target: client tags: "ocamlsf/learn-ocaml-client:master" platforms: "linux/amd64,linux/arm64/v8" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 924f5557..69609d8b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -124,6 +124,8 @@ jobs: with: pull: true push: true + cache-from: "type=gha" + cache-to: "type=gha,mode=min" tags: | ocamlsf/learn-ocaml:latest ocamlsf/learn-ocaml:${{ steps.tag.outputs.tag }} @@ -174,6 +176,8 @@ jobs: pull: true # load: true # implied by "driver: docker" push: true + cache-from: "type=gha" + cache-to: "type=gha,mode=min" target: client tags: | ocamlsf/learn-ocaml-client:latest