From 5a7545a8c3cb6cc51450398df54be7f203577b57 Mon Sep 17 00:00:00 2001 From: scott Date: Thu, 2 Apr 2026 22:17:40 -0400 Subject: [PATCH] Add Gitea Actions workflow to build and push Docker image Triggers on push to main. Uses BuildKit registry cache so the expensive CTranslate2 HIP compilation is cached between runs. Pushes both :latest and : tags to git.sdgarren.com container registry. Co-Authored-By: Claude Sonnet 4.6 --- .gitea/workflows/build.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .gitea/workflows/build.yml diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml new file mode 100644 index 0000000..b543764 --- /dev/null +++ b/.gitea/workflows/build.yml @@ -0,0 +1,34 @@ +name: Build and Push Docker Image + +on: + push: + branches: + - main + +jobs: + build-and-push: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to registry + uses: docker/login-action@v3 + with: + registry: git.sdgarren.com + username: ${{ secrets.REGISTRY_USERNAME }} + password: ${{ secrets.REGISTRY_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v6 + with: + context: . + push: true + tags: | + git.sdgarren.com/scott/rocm-faster-whisper:latest + git.sdgarren.com/scott/rocm-faster-whisper:${{ gitea.sha }} + cache-from: type=registry,ref=git.sdgarren.com/scott/rocm-faster-whisper:buildcache + cache-to: type=registry,ref=git.sdgarren.com/scott/rocm-faster-whisper:buildcache,mode=max