Skip to content

Initial commit: code, Dockerfile, and build workflow #1

Initial commit: code, Dockerfile, and build workflow

Initial commit: code, Dockerfile, and build workflow #1

Workflow file for this run

name: Build and push final image
on:
push:
branches: [main]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Pull models from HuggingFace space (LFS)
run: |
git clone --no-checkout https://huggingface.co/spaces/softcatala/comparativa-tts-catala /tmp/hf-space
cd /tmp/hf-space
git lfs install
git lfs pull --include="models/**"
cp -r models $GITHUB_WORKSPACE/models
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: |
ghcr.io/softcatala/comparativa-tts-catala:latest
ghcr.io/softcatala/comparativa-tts-catala:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max