]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commitdiff
ci : only publish/push docker images daily (#3854)
authorDaniel Bevenius <redacted>
Thu, 4 Jun 2026 08:30:48 +0000 (10:30 +0200)
committerGitHub <redacted>
Thu, 4 Jun 2026 08:30:48 +0000 (10:30 +0200)
This commit updates the docker workflow to be triggered on a schedule or
manually.

.github/workflows/docker.yml

index 9e07f7b2292fee973269573350f67a4f373d007f..51724976e0ac903804a9e4c7168c177e3b9e9607 100644 (file)
@@ -1,9 +1,10 @@
 name: Publish Docker image
 
 on:
-  push:
-    branches:
-      - master
+  workflow_dispatch: # allows manual triggering
+  schedule:
+    # Rebuild daily rather than on every push because it is expensive
+    - cron: '12 4 * * *'
 
 jobs:
   push_to_registry:
@@ -57,16 +58,14 @@ jobs:
         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
+          TAGS="$TAGS,ghcr.io/${{ github.repository }}:${{ matrix.config.tag }}-${{ env.COMMIT_SHA }}"
           echo "tags=$TAGS" >> $GITHUB_OUTPUT
 
       - name: Build and push Docker image (tagged)
         uses: docker/build-push-action@v6
         with:
           context: .
-          push: ${{ github.event_name == 'push' }}
+          push: true
           platforms: ${{ matrix.config.platform }}
           tags: ${{ steps.tags.outputs.tags }}
           file: ${{ matrix.config.dockerfile }}