From cb8337887ebf0cc000de9692d69f863f629d669c Mon Sep 17 00:00:00 2001 From: irl Date: Tue, 8 Jul 2025 14:58:29 +0100 Subject: [PATCH] feat: initial commit --- .forgejo/workflows/build-and-publish.yaml | 35 +++++++++++++++++++++++ .gbp.conf | 7 +++++ Dockerfile | 14 +++++++++ Justfile | 7 +++++ 4 files changed, 63 insertions(+) create mode 100644 .forgejo/workflows/build-and-publish.yaml create mode 100644 .gbp.conf create mode 100644 Dockerfile create mode 100644 Justfile diff --git a/.forgejo/workflows/build-and-publish.yaml b/.forgejo/workflows/build-and-publish.yaml new file mode 100644 index 0000000..72049d1 --- /dev/null +++ b/.forgejo/workflows/build-and-publish.yaml @@ -0,0 +1,35 @@ +name: Build and publish + +on: + push: + branches: + - main + +jobs: + build-and-push-arch: + runs-on: docker + container: + image: ghcr.io/catthehacker/ubuntu:act-latest + options: -v /dind/docker.sock:/var/run/docker.sock + steps: + - name: Checkout the repo + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to the registry + uses: docker/login-action@v3 + with: + registry: guardianproject.dev + username: irl + password: ${{ secrets.PACKAGE_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v6 + with: + context: src/ + file: src/Dockerfile + push: true + tags: guardianproject.dev/${{ github.repository }}:latest + diff --git a/.gbp.conf b/.gbp.conf new file mode 100644 index 0000000..ba8d4a1 --- /dev/null +++ b/.gbp.conf @@ -0,0 +1,7 @@ +[DEFAULT] +pristine-tar = True +pristine-tar-commit = True +upstream-branch=upstream/latest +debian-branch=debian/latest +pbuilder = True + diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3ea6b07 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM debian:12 + +RUN set -ex \ + && sed -i -- 's/Types: deb/Types: deb deb-src/g' /etc/apt/sources.list.d/debian.sources \ + && apt update && DEBIAN_FRONTEND=noninteractive apt install -y \ + build-essential \ + devscripts \ + fakeroot \ + git \ + git-buildpackage \ + && apt clean + +COPY .gbp.conf /root/.gbp.conf + diff --git a/Justfile b/Justfile new file mode 100644 index 0000000..118574a --- /dev/null +++ b/Justfile @@ -0,0 +1,7 @@ + +build: + docker build -t guardianproject.dev/ops/docker-debpkg:12 . + +debian: + docker run --rm --name debian -it guardianproject.dev/ops/docker-debpkg /bin/bash -l +