added gitea build action
Some checks failed
CI / docker (push) Failing after 3h10m4s

This commit is contained in:
2024-05-25 19:50:05 +08:00
parent efa31d5c66
commit 38cc60ee89
2 changed files with 35 additions and 1 deletions

View File

@@ -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

View File

@@ -1,7 +1,7 @@
FROM alpine:3.19 AS build FROM alpine:3.19 AS build
RUN --mount=type=cache,target=/var/cache/apk/,sharing=locked \ RUN --mount=type=cache,target=/var/cache/apk/,sharing=locked \
apk update &&\ 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 RUN adduser jovyan -u 1000 --system -s /bin/sh -h /home/jovyan
USER jovyan USER jovyan
WORKDIR /home/jovyan WORKDIR /home/jovyan