diff --git a/.gitea/workflows/build-dyndns.yaml b/.gitea/workflows/build-dyndns.yaml new file mode 100644 index 0000000..f7f6978 --- /dev/null +++ b/.gitea/workflows/build-dyndns.yaml @@ -0,0 +1,41 @@ +name: CI +on: + push: + branches: [ master ] + paths: + - 'dyndns/*' + - '.gitea/workflows/build-dyndns.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}}:dyndns" + platforms: | + linux/amd64 + linux/arm64 + push: true + pull: true + tags: | + "gitea.woggioni.net/woggioni/dyndns:latest" + cache-from: type=registry,ref=gitea.woggioni.net/woggioni/dyndns:buildx + cache-to: type=registry,mode=max,compression=zstd,image-manifest=true,oci-mediatypes=true,ref=gitea.woggioni.net/woggioni/dyndns:buildx + diff --git a/dyndns/Dockerfile b/dyndns/Dockerfile new file mode 100644 index 0000000..bccc3d6 --- /dev/null +++ b/dyndns/Dockerfile @@ -0,0 +1,12 @@ +FROM alpine:3.22 + +RUN --mount=type=cache,target=/var/cache/apk apk add python3 pipx +RUN addgroup -S dyndns +RUN adduser -D -S -h /var/lib/dyndns -G dyndns dyndns + +ADD --chown=dyndns:dyndns pi.conf /var/lib/dyndns/.pip/pip.conf + +USER dyndns +WORKDIR /var/lib/dyndns +RUN pipx install dyndns +ENV PATH="/var/lib/dyndns/.local/bin:$PATH" diff --git a/dyndns/pip.conf b/dyndns/pip.conf new file mode 100644 index 0000000..76457f3 --- /dev/null +++ b/dyndns/pip.conf @@ -0,0 +1,3 @@ +[global] +index-url = https://gitea.woggioni.net/api/packages/woggioni/pypi/simple +extra-index-url = https://pypi.org/simple diff --git a/dyndns/pypirc b/dyndns/pypirc new file mode 100644 index 0000000..4ef745b --- /dev/null +++ b/dyndns/pypirc @@ -0,0 +1,5 @@ +[distutils] +index-servers = gitea + +[gitea] +repository = https://gitea.woggioni.net/api/packages/woggioni/pypi/simple