Skip to content

Commit fab5553

Browse files
authored
[PM-26087] Add scheduler for API bindings job (#472)
Sets a schedule that is. run weekly but has an early exit on uneven weeks. I think this should match the renovate cadence.
1 parent d7ce769 commit fab5553

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

.github/workflows/update-api-bindings.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name: Update API Bindings
22

33
on:
44
workflow_dispatch:
5+
schedule:
6+
- cron: "0 4 * * 1" # Every Monday at 4 AM UTC
57

68
permissions:
79
contents: read
@@ -20,6 +22,15 @@ jobs:
2022
id-token: write
2123

2224
steps:
25+
- name: Early exit for uneven weeks
26+
if: github.event_name == 'schedule'
27+
run: |
28+
WEEK_NUM=$(date +%V)
29+
if [ $((WEEK_NUM % 2)) -ne 0 ]; then
30+
echo "Odd week ($WEEK_NUM), exiting early."
31+
exit 0
32+
fi
33+
2334
- name: Checkout
2435
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2536
with:

0 commit comments

Comments
 (0)