From 24dfcfeaf46164183738a60aa8c1c6f76bbc34ce Mon Sep 17 00:00:00 2001 From: Alek Kim Date: Mon, 13 Jul 2026 12:41:26 +0900 Subject: [PATCH] initial commit --- .github/workflows/workflow.yml | 56 ++++++++++++++++++++++++++++++++++ .gitignore | 2 ++ Dockerfile | 23 ++++++++++++++ 3 files changed, 81 insertions(+) create mode 100644 .github/workflows/workflow.yml create mode 100644 .gitignore create mode 100644 Dockerfile diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml new file mode 100644 index 0000000..3765d91 --- /dev/null +++ b/.github/workflows/workflow.yml @@ -0,0 +1,56 @@ +on: + push: + tags: + - '*.*.*' + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v7 + with: + fetch-depth: 0 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v4 + + - name: Docker Meta Action + uses: docker/metadata-action@v6 + id: meta + with: + images: ${{ gitea.server_url }}/${{ gitea.repository }} + tags: | + type=ref,event=tag + type=sha,format=short + + - name: Log in to Gitea Container Registry + uses: docker/login-action@v4 + with: + registry: ${{ gitea.server_url }} + username: ${{ gitea.actor }} + password: ${{ gitea.token }} + + - name: Build Docker image + uses: docker/build-push-action@v7 + with: + context: . + load: true + tags: ${{ steps.meta.outputs.tags }} + build-args: + GITEA_VERSION=${{ gitea.ref_name }} + + - name: Test Docker image + run: | + docker run --rm ${{ steps.meta.outputs.tags }} gitea --version + + - name: Push Docker image + uses: docker/build-push-action@v7 + with: + context: . + platforms: liniux/amd64,linux/arm64,linux/arm/v7 + push: true + tags: ${{ steps.meta.outputs.tags }} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a0c0ae1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +data/* +.idea/* diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..6d7682a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,23 @@ +ARG GITEA_VERSION=1.26.4 +ARG PYTHON_VERSION=3.14 + +FROM ghcr.io/astral-sh/uv:python${PYTHON_VERSION}-alpine AS uv +FROM docker.gitea.com/gitea:${GITEA_VERSION} + +COPY --from=uv /usr/local/bin/uv /usr/local/bin/uv + +ENV UV_LINK_MODE=copy \ + UV_COMPILE_BYTECODE=1 \ + PYTHONUNBUFFERED=1 \ + UV_SYSTEM_PYTHON=1 \ + UV_PYTHON_INSTALL_DIR=/usr/local/share/uv/python \ + UV_TOOL_BIN_DIR=/usr/local/bin \ + UV_TOOL_DIR=/usr/local/share/uv/tools + +RUN uv python install ${PYTHON_VERSION} && \ + uv tool install jupyter-core --with jupyter --with pyzmq --with nbconvert && \ + uv tool install nbconvert --with jupyter && \ + chown -R git:git /usr/local/share/uv/python && \ + chown -R git:git /usr/local/share/uv/tools && \ + chown -R git:git /usr/local/bin/ && \ + chmod -R u+rx /usr/local/share/uv/python /usr/local/share/uv/tools /usr/local/bin/