From aa3aab6135872184f802da30e4f512893e01a27f Mon Sep 17 00:00:00 2001 From: Hinton Date: Fri, 26 Sep 2025 14:58:04 +0200 Subject: [PATCH] Add scheduler for cron --- .github/workflows/update-api-bindings.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/update-api-bindings.yml b/.github/workflows/update-api-bindings.yml index d32c06d6b..44bee36ed 100644 --- a/.github/workflows/update-api-bindings.yml +++ b/.github/workflows/update-api-bindings.yml @@ -2,6 +2,8 @@ name: Update API Bindings on: workflow_dispatch: + schedule: + - cron: "0 4 * * 1" # Every Monday at 4 AM UTC permissions: contents: read @@ -20,6 +22,15 @@ jobs: id-token: write steps: + - name: Early exit for uneven weeks + if: github.event_name == 'schedule' + run: | + WEEK_NUM=$(date +%V) + if [ $((WEEK_NUM % 2)) -ne 0 ]; then + echo "Odd week ($WEEK_NUM), exiting early." + exit 0 + fi + - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: