mirror of
https://github.com/facefusion/facefusion-docker.git
synced 2026-04-28 20:35:57 +02:00
Introduce deployment
This commit is contained in:
@@ -4,21 +4,46 @@ on: [ push, pull_request ]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: ${{ matrix.config.image-name }}
|
||||
name: ${{ matrix.config.image-slug }}
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
config:
|
||||
- { docker-file: 'Dockerfile.cpu', image-name: 'facefusion-cpu' }
|
||||
- { docker-file: 'Dockerfile.cuda', image-name: 'facefusion-cuda' }
|
||||
- { docker-file: 'Dockerfile.tensorrt', image-name: 'facefusion-tensorrt' }
|
||||
- { docker-file: 'Dockerfile.rocm', image-name: 'facefusion-rocm' }
|
||||
- { docker-file: 'Dockerfile.cpu', image-slug: 'facefusion/facefusion:${{ github.ref_name }}-cpu' }
|
||||
- { docker-file: 'Dockerfile.cuda', image-slug: 'facefusion/facefusion:${{ github.ref_name }}-cuda' }
|
||||
- { docker-file: 'Dockerfile.tensorrt', image-slug: 'facefusion/facefusion:${{ github.ref_name }}-tensorrt' }
|
||||
- { docker-file: 'Dockerfile.rocm', image-slug: 'facefusion/facefusion:${{ github.ref_name }}-rocm' }
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Build
|
||||
run: docker build -f ${{ matrix.config.docker-file }} -t ${{ matrix.config.image-name }} .
|
||||
run: docker build -f ${{ matrix.config.docker-file }} -t ${{ matrix.config.image-slug }} .
|
||||
- name: Run
|
||||
run: docker run -d ${{ matrix.config.image-name }}
|
||||
run: docker run -d ${{ matrix.config.image-slug }}
|
||||
- name: Validate
|
||||
run: docker ps | grep -q ${{ matrix.config.image-name }}
|
||||
run: docker ps | grep -q ${{ matrix.config.image-slug }}
|
||||
deploy:
|
||||
name: ${{ matrix.config.image-slug }}
|
||||
runs-on: ubuntu-latest
|
||||
needs: test
|
||||
strategy:
|
||||
matrix:
|
||||
config:
|
||||
- { docker-file: 'Dockerfile.cpu', image-slug: 'facefusion/facefusion:${{ github.ref_name }}-cpu' }
|
||||
- { docker-file: 'Dockerfile.cuda', image-slug: 'facefusion/facefusion:${{ github.ref_name }}-cuda' }
|
||||
- { docker-file: 'Dockerfile.tensorrt', image-slug: 'facefusion/facefusion:${{ github.ref_name }}-tensorrt' }
|
||||
- { docker-file: 'Dockerfile.rocm', image-slug: 'facefusion/facefusion:${{ github.ref_name }}-rocm' }
|
||||
steps:
|
||||
- name: Login
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Build
|
||||
run: docker build -f ${{ matrix.config.docker-file }} -t ${{ matrix.config.image-slug }} .
|
||||
- name: Deploy
|
||||
run: docker push ${{ matrix.config.image-slug }}
|
||||
- name: Logout
|
||||
run: docker logout
|
||||
|
||||
Reference in New Issue
Block a user