Sync with whisper.cpp v1.4.3 🚀 #98
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 🐳 Docker Images | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- '**' | |
jobs: | |
linux-build-and-push: | |
name: 🐧 Linux Docker Build and Push | |
runs-on: ubuntu-latest | |
steps: | |
- name: 🔍 Checkout Repository | |
uses: actions/checkout@v4 | |
- name: 🛠️ Setup QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: 🛠️ Setup Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: 🖥️ Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_TOKEN }} | |
- name: 🏷️ Fetch Commit SHA | |
run: echo "SHA_SHORT=$(git rev-parse --short HEAD)" >> $GITHUB_ENV | |
- name: 🏷️ Extract Branch Name | |
run: echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV | |
- name: 🏷️ Define Tags | |
run: | | |
# Always set the default tags | |
echo "TAGS=dublok/stt:${GITHUB_REF_NAME},dublok/stt:${SHA_SHORT}" >> $GITHUB_ENV | |
# Check if GITHUB_REF_NAME starts with 'v' and if so, append 'latest' | |
if [[ $GITHUB_REF_NAME == v* ]]; then | |
echo "TAGS=${TAGS},dublok/stt:latest" >> $GITHUB_ENV | |
fi | |
- name: 🏷️ Echo Tags | |
run: | | |
# Source the GITHUB_ENV to make sure we have the latest values in the current shell session | |
source $GITHUB_ENV | |
echo "TAGS: ${TAGS}" | |
- name: 🛠️ Build and Push Docker Images | |
uses: docker/build-push-action@v5.0.0 | |
with: | |
context: ./src | |
file: ./src/Dockerfile | |
push: true | |
platforms: linux/amd64,linux/arm64,linux/s390x | |
tags: ${{ env.TAGS }} |