From 3423d0db3f74b1826b2fdfc307dddf43535cdc88 Mon Sep 17 00:00:00 2001 From: Oguz Ozturk Date: Mon, 24 Jun 2024 14:01:22 +0300 Subject: [PATCH] push every 15 days Signed-off-by: Oguz Ozturk --- .github/actions/docker-build-and-push/action.yaml | 5 ++--- .github/workflows/docker-build.yaml | 5 +++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/actions/docker-build-and-push/action.yaml b/.github/actions/docker-build-and-push/action.yaml index 4e42577f96b..ea750e6e7c6 100644 --- a/.github/actions/docker-build-and-push/action.yaml +++ b/.github/actions/docker-build-and-push/action.yaml @@ -16,7 +16,7 @@ inputs: required: false allow-push: description: "" - default: "true" + default: "false" required: false runs: @@ -108,8 +108,7 @@ runs: password: ${{ github.token }} - name: Build and Push to GitHub Container Registry - if: ${{ github.event_name == 'push' || - github.event_name == 'schedule' || + if: ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.artifacts-destination == 'registry') }} uses: docker/bake-action@v5 with: diff --git a/.github/workflows/docker-build.yaml b/.github/workflows/docker-build.yaml index 4c82f50b73c..c3bdc99c4e6 100644 --- a/.github/workflows/docker-build.yaml +++ b/.github/workflows/docker-build.yaml @@ -49,10 +49,11 @@ jobs: additional-tag-suffix: -cuda steps: - name: Check if push day + if: ${{ github.event_name == 'schedule' }} run: | if [ $(date +'%d') -eq 01 ] || [ $(date +'%d') -eq 15 ]; then echo "IS_PUSH_DAY=true" >> $GITHUB_ENV; else echo "IS_PUSH_DAY=false" >> $GITHUB_ENV; fi - if: ${{ github.event_name == 'schedule' }} - + echo "Day of the month: $(date +'%d')" + - name: Check out repository uses: actions/checkout@v4