Files
mrambossekandClaude Opus 4.7 a6168221d1
Build fdroidserver-ipfs image / build (push) Successful in 22s
initial: fdroidserver-ipfs image
Downstream of registry.gitlab.com/fdroid/docker-executable-fdroidserver:master,
patched for publishing F-Droid repos over IPFS:

  - install Debian ipfs-cid so fdroidserver populates ipfsCIDv1 on every
    package file (APKs, icons, screenshots), which fdroidclient with an
    IPFS-gateway mirror routes via CID natively
  - rehash.py wrapper that adds ipfsCIDv1 to entry["index"], renames the
    index to a content-addressed filename, and re-signs entry.jar after
    `fdroid update` — closes the cache-busting gap on the index file itself
  - entrypoint.sh chains rehash automatically after any `fdroid update`,
    so existing fdroid-via-docker wrappers need no changes

See SPEC.md for the rationale and Change 2's algorithm; README.md for
end-user usage.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-24 22:48:39 +02:00

67 lines
2.2 KiB
YAML

name: Build fdroidserver-ipfs image
# Triggers:
# - push to main → immediate rebuild (any change in the repo)
# - weekly cron → picks up upstream :master refreshes in
# docker-executable-fdroidserver without a
# source change here
# - manual dispatch → on-demand
on:
push:
branches: [main]
schedule:
# Sun 04:00 UTC.
- cron: "0 4 * * 0"
workflow_dispatch:
jobs:
build:
# Skip the job entirely (no runner provisioning) when the registry host
# isn't configured — shows as "skipped" in the UI rather than burning
# minutes on a build that can't be pushed. Secrets can't be referenced
# in job-level if:, so REGISTRY_TOKEN is still checked below.
if: vars.REGISTRY_HOST != ''
runs-on: ubuntu-docker
permissions:
packages: write
steps:
- name: Validate registry token
run: |
if [ -z "${{ secrets.REGISTRY_TOKEN }}" ]; then
echo "::error::Missing required config: secrets.REGISTRY_TOKEN"
exit 1
fi
- name: Checkout
uses: actions/checkout@v4
- name: Set up Buildx
uses: docker/setup-buildx-action@v3
- name: Compute date tag
id: date
run: echo "date=$(date -u +%Y%m%d)" >> "$GITHUB_OUTPUT"
- name: Log in to Gitea registry
uses: docker/login-action@v3
with:
registry: ${{ vars.REGISTRY_HOST }}
username: ${{ gitea.actor }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
# Two tags:
# :stable — moving, what callers pull by default
# :YYYYMMDD — immutable, for pinning / rollback
tags: |
${{ vars.REGISTRY_HOST }}/ci-images/fdroidserver-ipfs:stable
${{ vars.REGISTRY_HOST }}/ci-images/fdroidserver-ipfs:${{ steps.date.outputs.date }}
build-args: |
IMAGE_SOURCE=https://${{ vars.REGISTRY_HOST }}/ci-images/fdroidserver-ipfs
cache-from: type=registry,ref=${{ vars.REGISTRY_HOST }}/ci-images/fdroidserver-ipfs:stable
cache-to: type=inline