From 7a201a2e96bd82b87e4178972088bda8c2af66fc Mon Sep 17 00:00:00 2001 From: Helio Chissini de Castro Date: Wed, 4 Oct 2023 20:33:14 +0200 Subject: [PATCH] fix(docker): Enable push on schedule event To reduce the frequency of docker builds, on commit e3bbcdb the workflow moved from push based to schedule based. The registry publishing was attached to push and worflow_dispatch events, therefore, any schedule event was ignored. Since builds now happens once a day and in case of version tag, registry publish is now set to be valid on all build cases. For extended image, the time schedule set was removed and only when runtime main docker workflow has their build complete triggers the extended workflow using wokrflow_run dependency. Signed-off-by: Helio Chissini de Castro --- .github/workflows/docker-ort-runtime-ext.yml | 15 +-------------- .github/workflows/docker-ort-runtime.yml | 1 - 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/.github/workflows/docker-ort-runtime-ext.yml b/.github/workflows/docker-ort-runtime-ext.yml index b490b8d4fa7b0..7dada3bd953c4 100644 --- a/.github/workflows/docker-ort-runtime-ext.yml +++ b/.github/workflows/docker-ort-runtime-ext.yml @@ -19,18 +19,6 @@ name: Docker extended runtime image on: workflow_dispatch: - schedule: - - cron: '0 4 * * *' - pull_request: - paths: - - '.versions' - - 'Dockerfile' - - 'Dockerfile-extended' - - '.github/workflows/docker-ort-runtime.yml' - - '.github/workflows/docker-ort-runtime-ext.yml' - push: - tags: - - '*' workflow_run: workflows: - 'Docker runtime image' @@ -153,7 +141,6 @@ jobs: SWIFT_VERSION=${{ env.SWIFT_VERSION }} runtime_extended_image: - if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} name: Build ORT extended image needs: [ android_image, dart_image, dotnet_image, haskell_image, scala_image, swift_image ] runs-on: ubuntu-22.04 @@ -198,7 +185,7 @@ jobs: with: context: . file: Dockerfile-extended - push: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} + push: true load: false tags: | ${{ steps.meta-ort.outputs.tags }} diff --git a/.github/workflows/docker-ort-runtime.yml b/.github/workflows/docker-ort-runtime.yml index 625cdbee4bea3..034f26d954000 100644 --- a/.github/workflows/docker-ort-runtime.yml +++ b/.github/workflows/docker-ort-runtime.yml @@ -207,7 +207,6 @@ jobs: type=raw,value=${{ env.ORT_VERSION }} - name: Build ORT runtime image - if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} uses: docker/build-push-action@v5 with: context: .