This commit is contained in:
42
.gitea/workflows/build-cgit.yaml
Normal file
42
.gitea/workflows/build-cgit.yaml
Normal file
@@ -0,0 +1,42 @@
|
||||
|
||||
name: CI
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
paths:
|
||||
- 'cgit/*'
|
||||
- '.gitea/workflows/build-cgit.yaml'
|
||||
jobs:
|
||||
"Build dyndns docker images":
|
||||
runs-on: hostinger
|
||||
steps:
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3.4.0
|
||||
with:
|
||||
driver: docker-container
|
||||
platforms: |
|
||||
linux/amd64
|
||||
linux/arm64
|
||||
-
|
||||
name: Login to Gitea container registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: gitea.woggioni.net
|
||||
username: woggioni
|
||||
password: ${{ secrets.PUBLISHER_TOKEN }}
|
||||
-
|
||||
name: Build and push dyndns images
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: "{{defaultContext}}:cgit"
|
||||
platforms: |
|
||||
linux/amd64
|
||||
linux/arm64
|
||||
push: true
|
||||
pull: true
|
||||
tags: |
|
||||
"gitea.woggioni.net/woggioni/cgit:latest"
|
||||
cache-from: type=registry,ref=gitea.woggioni.net/woggioni/cgit:buildx
|
||||
cache-to: type=registry,mode=max,compression=zstd,image-manifest=true,oci-mediatypes=true,ref=gitea.woggioni.net/woggioni/cgit:buildx
|
||||
|
||||
10
cgit/Dockerfile
Normal file
10
cgit/Dockerfile
Normal file
@@ -0,0 +1,10 @@
|
||||
FROM alpine:3.22
|
||||
ARG VERSION
|
||||
RUN --mount=type=cache,target=/var/cache/apk apk add cgit uwsgi uwsgi-cgi py3-pygments-pyc py3-markdown py3-docutils lzip gzip bzip2 xz zstd
|
||||
ADD cgit.ini /etc/uwsgi/cgit.ini
|
||||
RUN mkdir -p /var/run/cgit
|
||||
RUN adduser -D -S -h /var/lib/cgit cgit
|
||||
RUN chown cgit:cgit /var/run/cgit
|
||||
WORKDIR /var/lib/cgit
|
||||
USER cgit
|
||||
ENTRYPOINT ["/usr/sbin/uwsgi", "--ini", "/etc/uwsgi/cgit.ini"]
|
||||
10
cgit/cgit.ini
Normal file
10
cgit/cgit.ini
Normal file
@@ -0,0 +1,10 @@
|
||||
[uwsgi]
|
||||
master = true
|
||||
plugins = cgi
|
||||
socket = /var/run/cgit/cgit.sock
|
||||
uid = cgit
|
||||
gid = cgit
|
||||
procname-master = uwsgi cgit
|
||||
processes = 1
|
||||
threads = 2
|
||||
cgi = /usr/share/webapps/cgit/cgit.cgi
|
||||
Reference in New Issue
Block a user