ci: Skip 'Free Disk Space' as the image is not big enough to require it. #55
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_publish | |
# Controls when the action will run. | |
on: | |
# Triggers the workflow on push or pull request events but only for the main branch | |
push: | |
branches: | |
- "master" | |
tags: | |
- "*" | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# Run the no_model build first ensure that the code at least builds | |
docker-no_model: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Setup docker | |
id: setup | |
uses: ./.github/workflows/docker-reused-setup-steps | |
with: | |
token: ${{ secrets.CR_PAT }} | |
- name: Build and push:no_model | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: ./Dockerfile.no_model | |
push: true | |
tags: ${{ steps.setup.outputs.tags }} | |
labels: ${{ steps.setup.outputs.labels }} | |
platforms: linux/amd64, linux/arm64 | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
# Run en first in sequence to build the cache | |
docker-en: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
max-parallel: 1 | |
matrix: | |
lang: | |
- en | |
model: | |
- tiny | |
- base | |
- small | |
- medium | |
- large-v2 | |
- large-v3 | |
needs: docker-no_model # wait for docker-no_model to finish | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Setup docker | |
id: setup | |
uses: ./.github/workflows/docker-reused-setup-steps | |
with: | |
token: ${{ secrets.CR_PAT }} | |
tag: ${{ matrix.model }}-${{ matrix.lang }} | |
- name: Build and push:${{ matrix.model }}-${{ matrix.lang }} | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: ./Dockerfile | |
push: true | |
tags: ${{ steps.setup.outputs.tags }} | |
labels: ${{ steps.setup.outputs.labels }} | |
build-args: | | |
WHISPER_MODEL=${{ matrix.model }} | |
LANG=${{ matrix.lang }} | |
platforms: linux/amd64, linux/arm64 | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
# Run all other languages in parallel without cache export | |
docker: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
max-parallel: 10 | |
matrix: | |
lang: | |
- fr | |
- de | |
- es | |
- it | |
- ja | |
- zh | |
- nl | |
- uk | |
- pt | |
- ar | |
- cs | |
- ru | |
- pl | |
- hu | |
- fi | |
- fa | |
- el | |
- tr | |
- da | |
- he | |
- vi | |
- ko | |
- ur | |
- te | |
- hi | |
model: | |
- tiny | |
- base | |
- small | |
- medium | |
- large-v2 | |
- large-v3 | |
needs: docker-en # wait for docker-en to finish | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Setup docker | |
id: setup | |
uses: ./.github/workflows/docker-reused-setup-steps | |
with: | |
token: ${{ secrets.CR_PAT }} | |
tag: ${{ matrix.model }}-${{ matrix.lang }} | |
- name: Build and push:${{ matrix.model }}-${{ matrix.lang }} | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: ./Dockerfile | |
push: true | |
tags: ${{ steps.setup.outputs.tags }} | |
labels: ${{ steps.setup.outputs.labels }} | |
build-args: | | |
WHISPER_MODEL=${{ matrix.model }} | |
LANG=${{ matrix.lang }} | |
platforms: linux/amd64, linux/arm64 | |
cache-from: type=gha |