From a37652a18b31fec15843fe5590939a71fc021b9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mois=C3=A9s=20Gonz=C3=A1lez?= Date: Mon, 18 May 2026 17:45:52 -0400 Subject: [PATCH 1/2] ci: add docker build action --- .github/workflows/ci.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6c1f49f..b5af265 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -83,3 +83,30 @@ jobs: uv publish \ --trusted-publishing always \ dist/* + + image_build: + runs-on: ubuntu-latest + name: Build the docker images + steps: + - name: Checkout repository + uses: actions/checkout@v6 + + - name: Install uv + uses: astral-sh/setup-uv@v7 + with: + enable-cache: true + version: ${{ env.UV_VERSION }} + + - name: Set up docker buildx + uses: docker/setup-buildx-action@v4 + + - name: Build codejail image + env: + TUTOR_ROOT: /tmp/tutor-root + run: | + uv run tutor plugins disable mfe indigo + uv run tutor plugins enable codejail + uv run tutor config save + uv run tutor images build codejail \ + -d "--cache-from=type=gha" \ + -d "--cache-to=type=gha,mode=max" From 5125cafe4ff40072596987a5a8865d3719d13d3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mois=C3=A9s=20Gonz=C3=A1lez?= Date: Fri, 9 Oct 2026 16:28:16 -0400 Subject: [PATCH 2/2] temp: test build push --- .github/workflows/ci.yml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b5af265..7ce0841 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -87,6 +87,9 @@ jobs: image_build: runs-on: ubuntu-latest name: Build the docker images + permissions: + contents: read + packages: write steps: - name: Checkout repository uses: actions/checkout@v6 @@ -100,13 +103,29 @@ jobs: - name: Set up docker buildx uses: docker/setup-buildx-action@v4 + - name: Log in to GHCR + if: github.ref != 'refs/heads/main' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build codejail image env: TUTOR_ROOT: /tmp/tutor-root run: | + REF="${GITHUB_REF_NAME,,}" + IMAGE="ghcr.io/${GITHUB_REPOSITORY,,}/codejail:test-${REF//\//-}" uv run tutor plugins disable mfe indigo uv run tutor plugins enable codejail - uv run tutor config save + uv run tutor config save --set CODEJAIL_DOCKER_IMAGE="$IMAGE" uv run tutor images build codejail \ -d "--cache-from=type=gha" \ -d "--cache-to=type=gha,mode=max" + + - name: Push test codejail image + if: github.ref != 'refs/heads/main' + env: + TUTOR_ROOT: /tmp/tutor-root + run: uv run tutor images push codejail