mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2025-06-29 14:11:36 +02:00
ci: set fail-fast to false in docker.yml (#3294)
* ci: set fail-fast to false in docker.yml This commit modifies the GitHub Actions workflow for Docker builds to disable the fail-fast behavior. The motivation for this is that currently if one of the strategy jobs fails any other job that is in progress will be cancelled. There is no need for this as the jobs are independent. * ci : update docker.yml to use a single build This commit updates the docker job to only build the image once instead of twice (only happens when pushing to the master branch). Instead this will tag the image with the commit SHA when pushing to master. The motivation for this change is to reduce the time it takes to run this job and also it might help with the disk space issues we are experiencing for this job when it runs on pushes to master.
This commit is contained in:
parent
f8abbeb234
commit
7069394447
22
.github/workflows/docker.yml
vendored
22
.github/workflows/docker.yml
vendored
@ -15,6 +15,7 @@ jobs:
|
||||
env:
|
||||
COMMIT_SHA: ${{ github.sha }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
config:
|
||||
- { tag: "main", dockerfile: ".devops/main.Dockerfile", platform: "linux/amd64" }
|
||||
@ -41,21 +42,20 @@ jobs:
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and push Docker image (versioned)
|
||||
if: github.event_name == 'push'
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
platforms: ${{ matrix.config.platform }}
|
||||
tags: "ghcr.io/${{ github.repository }}:${{ matrix.config.tag }}-${{ env.COMMIT_SHA }}"
|
||||
file: ${{ matrix.config.dockerfile }}
|
||||
- name: Generate tags
|
||||
id: tags
|
||||
run: |
|
||||
TAGS="ghcr.io/${{ github.repository }}:${{ matrix.config.tag }}"
|
||||
if [ "${{ github.event_name }}" == "push" ]; then
|
||||
TAGS="$TAGS,ghcr.io/${{ github.repository }}:${{ matrix.config.tag }}-${{ env.COMMIT_SHA }}"
|
||||
fi
|
||||
echo "tags=$TAGS" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Build and push Docker image (tagged)
|
||||
uses: docker/build-push-action@v4
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: ${{ github.event_name == 'push' }}
|
||||
platforms: ${{ matrix.config.platform }}
|
||||
tags: "ghcr.io/${{ github.repository }}:${{ matrix.config.tag }}"
|
||||
tags: ${{ steps.tags.outputs.tags }}
|
||||
file: ${{ matrix.config.dockerfile }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user