Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,49 @@ jobs:
uv publish \
--trusted-publishing always \
dist/*

image_build:
runs-on: ubuntu-latest
name: Build the docker images
permissions:
contents: read
packages: write
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: 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 --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
Loading