Spaces:
Configuration error
Configuration error
File size: 2,150 Bytes
911fcc1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
name: Build Image
on:
push:
branches:
- main
tags:
- "v*"
jobs:
build:
runs-on: ubuntu-latest-16c64g
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Get Version
run: |
if [[ $GITHUB_REF == refs/tags/v* ]]; then
version=$(basename ${GITHUB_REF})
else
version=nightly
fi
echo "version=${version}" >> $GITHUB_ENV
echo "Current version: ${version}"
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PAT }}
- name: Build and Push Image
uses: docker/build-push-action@v6
with:
context: .
file: dockerfile
platforms: linux/amd64
push: true
tags: |
fishaudio/fish-speech:${{ env.version }}
fishaudio/fish-speech:latest
outputs: type=image,oci-mediatypes=true,compression=zstd,compression-level=3,force-compression=true
cache-from: type=registry,ref=fishaudio/fish-speech:latest
cache-to: type=inline
- name: Build and Push Dev Image
uses: docker/build-push-action@v6
with:
context: .
file: dockerfile.dev
platforms: linux/amd64
push: true
build-args: |
VERSION=${{ env.version }}
BASE_IMAGE=fishaudio/fish-speech:${{ env.version }}
tags: |
fishaudio/fish-speech:${{ env.version }}-dev
fishaudio/fish-speech:latest-dev
outputs: type=image,oci-mediatypes=true,compression=zstd,compression-level=3,force-compression=true
cache-from: type=registry,ref=fishaudio/fish-speech:latest-dev
cache-to: type=inline
- name: Push README to Dockerhub
uses: peter-evans/dockerhub-description@v4
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PAT }}
repository: fishaudio/fish-speech
|