This commit is contained in:
Josh XT committed 2024-01-22 11:49:10 -05:00
1 parent f089e3e85b
commit cd164ae258
1 file changed
+12 -7
+12 -7
View File
@@ -13,10 +13,10 @@ jobs:
strategy: strategy:
matrix: matrix:
include: include:
- dockerfile: "./Dockerfile" - dockerfile: "Dockerfile"
platforms: "linux/amd64,linux/arm64/v8" platforms: "linux/amd64,linux/arm64/v8"
tag_name: "cpu" tag_name: "cpu"
- dockerfile: "./nvidia.Dockerfile" - dockerfile: "nvidia.Dockerfile"
platforms: "linux/amd64" platforms: "linux/amd64"
tag_name: "cuda" tag_name: "cuda"
steps: steps:
@@ -26,11 +26,16 @@ jobs:
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
- name: Lowercase Actor and Extract Repo Name
run: |
echo "ACTOR_LOWER=$(echo ${{ github.actor }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
echo "REPO_NAME=$(echo ${{ github.repository }} | cut -d'/' -f 2)" >> $GITHUB_ENV
- name: Login to GitHub Container Registry - name: Login to GitHub Container Registry
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ github.actor }} username: ${{ env.ACTOR_LOWER }}
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to DockerHub - name: Login to DockerHub
@@ -44,12 +49,12 @@ jobs:
uses: docker/build-push-action@v5 uses: docker/build-push-action@v5
with: with:
context: . context: .
file: ${{ matrix.dockerfile }} file: ./${{ matrix.dockerfile }}
platforms: ${{ matrix.platforms }} platforms: ${{ matrix.platforms }}
push: true push: true
tags: | tags: |
ghcr.io/${{ github.actor }}/alltalk_tts:${{ matrix.tag_name }}-${{ github.sha }} ghcr.io/${{ env.ACTOR_LOWER }}/${{ env.REPO_NAME }}:${{ matrix.tag_name }}-${{ github.sha }}
ghcr.io/${{ github.actor }}/alltalk_tts:${{ matrix.tag_name }} ghcr.io/${{ env.ACTOR_LOWER }}/${{ env.REPO_NAME }}:${{ matrix.tag_name }}
- name: Docker Hub Description - name: Docker Hub Description
if: vars.DOCKERHUB_USERNAME != '' if: vars.DOCKERHUB_USERNAME != ''
@@ -57,4 +62,4 @@ jobs:
with: with:
username: ${{ vars.DOCKERHUB_USERNAME }} username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }} password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: ${{ vars.DOCKERHUB_USERNAME }}/alltalk_tts repository: ${{ vars.DOCKERHUB_USERNAME }}/${{ env.REPO_NAME }}