Skip to content

Commit 0b9f320

Browse files
authored
Fix release schedule again (#4364)
There's no way to tell cron to run a job on the first Saturday of a month, so we tell it to run every Saturday, and manually check whether it's the first week of the month. This is not ideal because we'll get notifications about failed releases three times a month, but it's better than nothing for now.
2 parents 182cefc + f7fd521 commit 0b9f320

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

.github/workflows/release.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ name: Release
22

33
on:
44
schedule:
5-
# Runs at 2:00 AM UTC on the first Saturday of every month
6-
- cron: '0 2 1-7 * 6'
5+
# Runs at 2:00 AM UTC on every Saturday
6+
# We'll check below if it's the first Saturday of the month, and fail if not
7+
- cron: '0 2 * * 6'
78
# Allow manual triggering of the workflow
89
workflow_dispatch:
910
inputs:
@@ -25,6 +26,13 @@ jobs:
2526
check-and-release:
2627
runs-on: ubuntu-latest
2728
steps:
29+
- name: Check for first Saturday of the month
30+
run: |
31+
if (( $(date +%e) > 7 )); then
32+
echo "This is not the first Saturday of the month"
33+
exit 1
34+
fi
35+
2836
- name: Checkout Code
2937
uses: actions/checkout@v4
3038
with:

0 commit comments

Comments
 (0)