From 38cc60ee89bc765763db4a4ec1eacdff3688c1b6 Mon Sep 17 00:00:00 2001 From: Walter Oggioni Date: Sat, 25 May 2024 19:50:05 +0800 Subject: [PATCH] added gitea build action --- .gitea/workflows/build.yaml | 34 ++++++++++++++++++++++++++++++++++ jupyter-python/Dockerfile | 2 +- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 .gitea/workflows/build.yaml diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml new file mode 100644 index 0000000..9438080 --- /dev/null +++ b/.gitea/workflows/build.yaml @@ -0,0 +1,34 @@ +name: CI +on: + push: + branches: [ master ] +jobs: + docker: + runs-on: woryzen + steps: + - + name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - + name: Login to Gitea container registry + uses: docker/login-action@v3 + with: + registry: gitea.woggioni.net + username: woggioni + password: ${{ secrets.PUBLISHER_TOKEN }} + - + name: List current directory + run: ls -l && pwd + - + name: Build and push jupyter-python image + uses: docker/build-push-action@v5.3.0 + with: + context: "{{defaultContext}}:jupyter-python" + platforms: linux/amd64,linux/arm64 + push: true + tags: gitea.woggioni.net/woggioni/jupyter-python:latest + cache-from: type=registry,ref=gitea.woggioni.net/woggioni/jupyter-python:buildcache + cache-to: type=registry,ref=gitea.woggioni.net/woggioni/jupyter-python:buildcache,mode=max diff --git a/jupyter-python/Dockerfile b/jupyter-python/Dockerfile index b9c123d..aaa4611 100644 --- a/jupyter-python/Dockerfile +++ b/jupyter-python/Dockerfile @@ -1,7 +1,7 @@ FROM alpine:3.19 AS build RUN --mount=type=cache,target=/var/cache/apk/,sharing=locked \ apk update &&\ - apk add python3 python3-dev pipx gcc g++ musl-dev linux-headers libffi-dev + apk add python3 python3-dev pipx gcc g++ musl-dev linux-headers libffi-dev cargo RUN adduser jovyan -u 1000 --system -s /bin/sh -h /home/jovyan USER jovyan WORKDIR /home/jovyan