Skip to content

build whisper-gui

build whisper-gui #16

Workflow file for this run

name: build whisper-gui
on:
push:
branches:
- 'main'
paths:
- 'whisper-gui/**'
- '!whisper-gui/README.md'
schedule:
# cron: 'min hour day month weekday'
- cron: '0 4 * * 3' # every wednesday on 04:00
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'warning'
tags:
description: 'run action manually'
jobs:
multi:
runs-on: self-hosted
steps:
# https://github.com/actions/checkout
- name: Checkout
uses: actions/checkout@v4
# https://github.com/docker/setup-qemu-action
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
# https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
# https://github.com/docker/login-action
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# https://github.com/marketplace/actions/free-disk-space-ubuntu
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
# this might remove tools that are actually needed,
# if set to "true" but frees about 6 GB
tool-cache: true
# all of these default to true, but feel free to set to
# "false" if necessary for your workflow
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: false
swap-storage: true
- name: Build and Tag
id: tag
run: |
docker build -t 3x3cut0r/whisper-gui:latest ./whisper-gui
CONTAINER_ID=$(docker create 3x3cut0r/whisper-gui:latest)
docker cp "${CONTAINER_ID}:/VERSION" VERSION
VERSION=$(cat VERSION | grep whisper-gui | cut -d= -f2 | head -n 1)
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
# https://github.com/marketplace/actions/free-disk-space-ubuntu
- name: Free Disk Space (Docker)
uses: jlumbroso/free-disk-space@main
with:
# this might remove tools that are actually needed,
# if set to "true" but frees about 6 GB
tool-cache: true
# all of these default to true, but feel free to set to
# "false" if necessary for your workflow
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true
# https://github.com/docker/build-push-action
- name: Build and push
uses: docker/build-push-action@v5
with:
context: ./whisper-gui
file: ./whisper-gui/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: |
3x3cut0r/whisper-gui:latest
3x3cut0r/whisper-gui:${{ steps.tag.outputs.VERSION }}