From 1474022706e31d16f8997ec62009ea30b4e17dbc Mon Sep 17 00:00:00 2001 From: TDPI Date: Sun, 1 Mar 2026 09:18:43 +0100 Subject: [PATCH] initial: lib fix --- .gitea/workflows/build.yaml | 79 +++++++++++++++++++++++++++++++++++++ Dockerfile | 5 +++ README.md | 29 ++++++++++++++ 3 files changed, 113 insertions(+) create mode 100644 .gitea/workflows/build.yaml create mode 100644 Dockerfile create mode 100644 README.md diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml new file mode 100644 index 0000000..2e8781f --- /dev/null +++ b/.gitea/workflows/build.yaml @@ -0,0 +1,79 @@ +name: Build and Push + +on: + schedule: + # Täglich um 04:00 UTC + - cron: '0 22 * * *' + workflow_dispatch: + push: + branches: + - main + +env: + REGISTRY: git.tdpi.dev + IMAGE_NAME: tdpi/protonmailmailbridge-fix + UPSTREAM_IMAGE: shenxn/protonmail-bridge:latest + +jobs: + check-and-build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Get upstream digest + id: upstream + run: | + UPSTREAM_DIGEST=$(docker manifest inspect ${{ env.UPSTREAM_IMAGE }} | jq -r '.manifests[0].digest // .config.digest') + echo "digest=${UPSTREAM_DIGEST}" >> $GITHUB_OUTPUT + echo "Upstream digest: ${UPSTREAM_DIGEST}" + + - name: Get current digest from registry + id: current + continue-on-error: true + run: | + CURRENT_DIGEST=$(docker manifest inspect ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest 2>/dev/null | jq -r '.annotations["upstream.digest"] // empty') + echo "digest=${CURRENT_DIGEST}" >> $GITHUB_OUTPUT + echo "Current stored upstream digest: ${CURRENT_DIGEST}" + + - name: Check if build needed + id: check + run: | + if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then + echo "needed=true" >> $GITHUB_OUTPUT + echo "Manual trigger - building" + elif [ "${{ github.event_name }}" = "push" ]; then + echo "needed=true" >> $GITHUB_OUTPUT + echo "Push event - building" + elif [ "${{ steps.upstream.outputs.digest }}" != "${{ steps.current.outputs.digest }}" ]; then + echo "needed=true" >> $GITHUB_OUTPUT + echo "Upstream changed - building" + else + echo "needed=false" >> $GITHUB_OUTPUT + echo "No changes - skipping build" + fi + + - name: Set up Docker Buildx + if: steps.check.outputs.needed == 'true' + uses: docker/setup-buildx-action@v3 + + - name: Login to Gitea Registry + if: steps.check.outputs.needed == 'true' + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ secrets.REGISTRY_USER }} + password: ${{ secrets.REGISTRY_TOKEN }} + + - name: Build and push + if: steps.check.outputs.needed == 'true' + uses: docker/build-push-action@v5 + with: + context: . + push: true + tags: | + ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest + labels: | + upstream.digest=${{ steps.upstream.outputs.digest }} + annotations: | + upstream.digest=${{ steps.upstream.outputs.digest }} diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..57a28a0 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,5 @@ +FROM shenxn/protonmail-bridge:latest + +RUN apt-get update && \ + apt-get install -y --no-install-recommends libfido2-1 && \ + rm -rf /var/lib/apt/lists/* diff --git a/README.md b/README.md new file mode 100644 index 0000000..7f3443e --- /dev/null +++ b/README.md @@ -0,0 +1,29 @@ +# protonmail-bridge-libfido2 + +Wrapper-Image für `shenxn/protonmail-bridge:latest` mit `libfido2-1` installiert. + +## Hintergrund + +Proton Mail Bridge 3.22.0+ benötigt `libfido2`, aber das shenxn-Image enthält diese Bibliothek nicht. Dieses Image fügt sie hinzu. + +## Verwendung + +```yaml +proton-bridge: + image: git.tdpi.dev/tdpi/protonmail-bridge-libfido2:latest + container_name: paperless-protonmail-bridge + restart: unless-stopped + volumes: + - /mnt/docker/appdata/paperless_bridge_data:/root +``` + +## Automatische Updates + +Der Workflow prüft täglich um 04:00 UTC ob sich `shenxn/protonmail-bridge:latest` geändert hat und baut nur dann neu. + +## Secrets + +Im Repository müssen folgende Secrets konfiguriert sein: + +- `REGISTRY_USER`: Gitea Benutzername +- `REGISTRY_TOKEN`: Gitea Access Token mit Package-Rechten