mirror of
https://github.com/DrewThomasson/ebook2audiobook.git
synced 2026-01-09 22:08:13 -05:00
Simplify Docker-Build.yml
Makes the huggingface build only run if the first 2 docker builds succeed
This commit is contained in:
42
.github/workflows/Docker-Build.yml
vendored
42
.github/workflows/Docker-Build.yml
vendored
@@ -155,46 +155,6 @@ jobs:
|
|||||||
-t "$CUDA_TAG_2" \
|
-t "$CUDA_TAG_2" \
|
||||||
-t "$CUDA_TAG_3" \
|
-t "$CUDA_TAG_3" \
|
||||||
--push .
|
--push .
|
||||||
|
|
||||||
|
|
||||||
- name: Prune docker & buildx
|
|
||||||
run: |
|
|
||||||
docker system prune -af --volumes
|
|
||||||
docker buildx prune -af
|
|
||||||
|
|
||||||
huggingface-build:
|
|
||||||
runs-on: [self-hosted, macos]
|
|
||||||
steps:
|
|
||||||
|
|
||||||
- name: Wipe & Re-Clone E2A E2ADockerBuild
|
|
||||||
if: ${{ inputs.wipeAndReinstall }}
|
|
||||||
run: rm -rf ~/E2ADockerBuild/ebook2audiobook
|
|
||||||
|
|
||||||
- name: Clone ebook2audiobook into E2ADockerBuild
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
if [ -d ~/E2ADockerBuild/ebook2audiobook ]; then
|
|
||||||
cd ~/E2ADockerBuild/ebook2audiobook
|
|
||||||
git fetch --all
|
|
||||||
git reset --hard ${{ github.event.pull_request.head.sha || github.sha }}
|
|
||||||
else
|
|
||||||
git clone https://github.com/DrewThomasson/ebook2audiobook.git ~/E2ADockerBuild/ebook2audiobook
|
|
||||||
cd ~/E2ADockerBuild/ebook2audiobook
|
|
||||||
git fetch --all
|
|
||||||
git reset --hard ${{ github.event.pull_request.head.sha || github.sha }}
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v2
|
|
||||||
with:
|
|
||||||
driver: docker-container
|
|
||||||
buildkitd-flags: "--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host"
|
|
||||||
|
|
||||||
- name: Log in to Docker Hub
|
|
||||||
uses: docker/login-action@v2
|
|
||||||
with:
|
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
||||||
|
|
||||||
- name: Build and Push Huggingface Docker Image
|
- name: Build and Push Huggingface Docker Image
|
||||||
run: |
|
run: |
|
||||||
@@ -203,10 +163,10 @@ jobs:
|
|||||||
-f dockerfiles/HuggingfaceDockerfile \
|
-f dockerfiles/HuggingfaceDockerfile \
|
||||||
-t ${{ secrets.DOCKER_USERNAME }}/ebook2audiobook:HuggingfaceSpace \
|
-t ${{ secrets.DOCKER_USERNAME }}/ebook2audiobook:HuggingfaceSpace \
|
||||||
--push .
|
--push .
|
||||||
|
|
||||||
|
|
||||||
- name: Prune docker & buildx
|
- name: Prune docker & buildx
|
||||||
run: |
|
run: |
|
||||||
docker system prune -af --volumes
|
docker system prune -af --volumes
|
||||||
docker buildx prune -af
|
docker buildx prune -af
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user