Skip to content

Commit f5a1f0f

Browse files
authored
fix: fix cron job for monthly sync discussion workflow (#3895)
* Updated cron config and added check for first Wednesday of month
1 parent faa9dc7 commit f5a1f0f

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

.github/workflows/create_monthly_sync.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,23 @@ name: Create Monthly Sync discussion
33
# First Wednesday of every month at 12AM UTC
44
on:
55
schedule:
6-
- cron: "0 0 1-7 * 3"
6+
- cron: "0 0 * * 3"
77

88
jobs:
99
create-discussion:
1010
permissions:
1111
discussions: write
1212
runs-on: ubuntu-22.04
1313
steps:
14+
- name: Check if first Wednesday
15+
id: check
16+
run: |
17+
DOM=$(date +%d)
18+
if [ "$DOM" -gt 7 ]; then
19+
echo "Not the first Wednesday of the month, skipping"
20+
exit 0
21+
fi
22+
1423
- name: Get repository information
1524
id: get-repository-info
1625
uses: octokit/graphql-action@v2.x

0 commit comments

Comments
 (0)