Skip to content

Add stable whisper implementation for more accurate timestamps and al… #56

Add stable whisper implementation for more accurate timestamps and al…

Add stable whisper implementation for more accurate timestamps and al… #56

Workflow file for this run

name: Publish API Docker image
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-dev.[0-9]+"
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build_and_publish:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern={{version}} # short for major.minor.patch
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=raw,value=latest,enable=${{ !contains(github.ref, 'dev') }}
type=raw,value=dev,priority=1000,enable=${{ contains(github.ref, 'dev') }}
flavor: |
latest=false
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: ./
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
# OLD deploy to server, manual deploy necessary on the new server
# deploy:
# needs: [build_and_publish]
# runs-on: ubuntu-latest
# strategy:
# matrix:
# python-version: ["3.10"]
# steps:
# - name: Checkout repository
# uses: actions/checkout@v2
# - name: Add SSH key
# env:
# SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
# run: |
# mkdir -p ~/.ssh
# echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
# chmod 600 ~/.ssh/id_rsa
# echo "StrictHostKeyChecking no" > ~/.ssh/config
# - name: Transfer docker-compose.yml and /infrastructure to server
# env:
# HOST: ${{ secrets.HOST }}
# USER: ${{ secrets.USER }}
# run: |
# scp -i ~/.ssh/id_rsa -r ./infrastructure $USER@$HOST:/home/shuffle/asr-api-prod/
# scp -i ~/.ssh/id_rsa ./docker-compose.yml $USER@$HOST:/home/shuffle/asr-api-prod/
# scp -i ~/.ssh/id_rsa ./config.yml $USER@$HOST:/home/shuffle/asr-api-prod/