Skip to content

Speakr is a personal, self-hosted web application designed for transcribing audio recordings

Python

Drop Forgejo image-build workflows; Forgejo now runs tests only and image publishing is owned by GitHub Actions on release

Murtaza Nasir100982f5304b
diff --git a/.forgejo/workflows/docker-build.yml b/.forgejo/workflows/docker-build.yml
deleted file mode 100644
index f3a9617d..00000000
--- a/.forgejo/workflows/docker-build.yml
+++ /dev/null
@@ -1,60 +0,0 @@
-name: Build images (no publish)
-
-# "Does everything still build?" check. Builds BOTH images (main + lite) for BOTH
-# architectures (linux/amd64 + linux/arm64) using the same steps as the publish
-# workflow, but with push: false and NO Docker Hub login/secrets, so nothing is
-# ever published. This is the private pre-flight gate: it runs automatically when
-# a v* tag is pushed to this Forgejo remote, so the full and arm builds are
-# validated here before the public GitHub release publishes the images. It can
-# also be started by hand from the Forgejo Actions tab.
-on:
- push:
- tags:
- - 'v*'
- workflow_dispatch:
-
-jobs:
- build-main:
- runs-on: ubuntu-latest
- steps:
- - name: Checkout repository
- uses: actions/checkout@v5
-
- - name: Set up QEMU
- uses: docker/setup-qemu-action@v3
-
- - name: Set up Docker Buildx
- uses: docker/setup-buildx-action@v3
-
- - name: Build main image (no push)
- uses: docker/build-push-action@v6
- with:
- context: .
- platforms: linux/amd64,linux/arm64
- push: false
- tags: speakr:build-test
- build-args: |
- PRODUCTION=1
-
- build-lite:
- runs-on: ubuntu-latest
- steps:
- - name: Checkout repository
- uses: actions/checkout@v5
-
- - name: Set up QEMU
- uses: docker/setup-qemu-action@v3
-
- - name: Set up Docker Buildx
- uses: docker/setup-buildx-action@v3
-
- - name: Build lite image (no push)
- uses: docker/build-push-action@v6
- with:
- context: .
- platforms: linux/amd64,linux/arm64
- push: false
- tags: speakr:build-test-lite
- build-args: |
- PRODUCTION=1
- LIGHTWEIGHT=1
diff --git a/.forgejo/workflows/docker-publish.yml b/.forgejo/workflows/docker-publish.yml
deleted file mode 100644
index d3cc4d4c..00000000
--- a/.forgejo/workflows/docker-publish.yml
+++ /dev/null
@@ -1,130 +0,0 @@
-name: Publish to Docker Hub
-
-# Publish step, kept separate from CI. Tag-push publishing is now owned by the
-# GitHub workflow (.github/workflows/docker-publish.yml fires on a published
-# Release) so release images are built on public runners with auditable logs and
-# provenance. This Forgejo workflow is a MANUAL fallback only: run it by hand
-# from the Actions tab if GitHub CD is unavailable. It does NOT fire on tag
-# pushes, so the same tag is never published from two places at once.
-# Building/pushing the multi-arch images needs the DOCKERHUB_USERNAME /
-# DOCKERHUB_TOKEN repo secrets. To hand CD back to Forgejo, restore the
-# `push: tags: ['v*']` trigger here and comment out the GitHub `release` trigger.
-#
-on:
- workflow_dispatch:
- inputs:
- image_tag:
- description: "Image tag to publish"
- required: false
- default: latest
-
-env:
- REGISTRY: docker.io
- IMAGE_NAME: learnedmachine/speakr
- # Manual run -> the input; tag push -> the git tag name (e.g. v0.6.0).
- IMAGE_TAG: ${{ github.event.inputs.image_tag || github.ref_name }}
-
-jobs:
- # Quick gate so a broken migration never gets published, even if someone runs
- # this against an untested commit. The full suite lives in the Tests workflow.
- test:
- runs-on: ubuntu-latest
-
- services:
- postgres:
- image: postgres:16
- env:
- POSTGRES_USER: speakr
- POSTGRES_PASSWORD: speakr
- POSTGRES_DB: speakr_test
- ports:
- - 5432:5432
- options: >-
- --health-cmd "pg_isready -U speakr"
- --health-interval 10s
- --health-timeout 5s
- --health-retries 5
-
- steps:
- - name: Checkout repository
- uses: actions/checkout@v5
-
- - name: Set up Python
- uses: actions/setup-python@v6
- with:
- python-version: '3.11'
-
- - name: Install dependencies
- run: pip install -r requirements.txt
-
- - name: Run static migration compatibility tests
- run: python tests/test_migration_compatibility.py
-
- - name: Run migrations against PostgreSQL
- env:
- TEST_DATABASE_URI: postgresql://speakr:speakr@postgres:5432/speakr_test
- run: python tests/test_postgres_migrations.py
-
- build:
- needs: test
- runs-on: ubuntu-latest
-
- steps:
- - name: Checkout repository
- uses: actions/checkout@v5
-
- # arm64 is built via QEMU emulation (no native arm runner). Slow but works.
- - name: Set up QEMU
- uses: docker/setup-qemu-action@v3
-
- - name: Set up Docker Buildx
- uses: docker/setup-buildx-action@v3
-
- - name: Log into Docker Hub
- uses: docker/login-action@v3
- with:
- registry: ${{ env.REGISTRY }}
- username: ${{ secrets.DOCKERHUB_USERNAME }}
- password: ${{ secrets.DOCKERHUB_TOKEN }}
-
- - name: Build and push image
- uses: docker/build-push-action@v6
- with:
- context: .
- platforms: linux/amd64,linux/arm64
- push: true
- tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}
- build-args: |
- PRODUCTION=1
-
- build-lite:
- needs: test
- runs-on: ubuntu-latest
-
- steps:
- - name: Checkout repository
- uses: actions/checkout@v5
-
- - name: Set up QEMU
- uses: docker/setup-qemu-action@v3
-
- - name: Set up Docker Buildx
- uses: docker/setup-buildx-action@v3
-
- - name: Log into Docker Hub
- uses: docker/login-action@v3
- with:
- registry: ${{ env.REGISTRY }}
- username: ${{ secrets.DOCKERHUB_USERNAME }}
- password: ${{ secrets.DOCKERHUB_TOKEN }}
-
- - name: Build and push lite image
- uses: docker/build-push-action@v6
- with:
- context: .
- platforms: linux/amd64,linux/arm64
- push: true
- tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}-lite
- build-args: |
- PRODUCTION=1
- LIGHTWEIGHT=1