File tree Expand file tree Collapse file tree 3 files changed +59
-2
lines changed Expand file tree Collapse file tree 3 files changed +59
-2
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ name: Create OCWM Monthly
2
2
3
3
on :
4
4
schedule :
5
- - cron : " 0 9 15-21 * 2" # Runs at 9:00 AM on the 3rd Tuesday of the month
5
+ - cron : " 0 9 * * 2" # Runs at 9:00 AM every Tuesday
6
6
7
7
repository_dispatch :
8
8
types : ocwm-creator
35
35
date=$(date -u -d "6 days" +%Y-%m-%d)
36
36
echo "title=Open Community Working Meeting ${date} - 12:00 PT" >> "$GITHUB_OUTPUT"
37
37
38
+ # Step to check if it's the third Tuesday of the month
39
+ - name : Check if today is the third Tuesday
40
+ id : check-third-tuesday
41
+ run : |
42
+ day=$(date +%d)
43
+ dow=$(date +%u) # Day of the week (1 = Monday, ..., 7 = Sunday)
44
+ # Get the first day of this month
45
+ first_tuesday=$(cal | awk '/^..$/ {print $3}')
46
+ if [ "$dow" -ne 2 ]; then
47
+ echo "Not a Tuesday, exiting..."
48
+ exit 0
49
+ fi
50
+ # Calculate the third Tuesday by checking if the current date is between 15th and 21st
51
+ if [ "$day" -ge 15 ] && [ "$day" -le 21 ]; then
52
+ echo "This is the third Tuesday of the month!"
53
+ else
54
+ echo "Not the third Tuesday, exiting..."
55
+ exit 0
56
+ fi
57
+
38
58
- name : Create Issue using Template
39
59
id : create-issue
40
60
uses : peter-evans/create-issue-from-file@v5
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ name: Search for issues and PR labeled 'agenda' and add them to the agenda
2
2
3
3
on :
4
4
schedule :
5
- - cron : ' 0 0 8-14 * 0 ' # Runs at midnight on the second Sunday of the month
5
+ - cron : ' 0 1 * * 1 ' # Runs at 1:00 AM every Monday
6
6
7
7
repository_dispatch :
8
8
types : add-issues-ocwm
26
26
27
27
- name : Install dependencies
28
28
run : npm install @octokit/core@5.1.0
29
+
30
+ # Step to check if today is the third Monday
31
+ - name : Check if today is the third Monday
32
+ id : check-third-monday
33
+ run : |
34
+ day=$(date +%d)
35
+ dow=$(date +%u) # Day of the week (1 = Monday, ..., 7 = Sunday)
36
+ # Check if the day is between 15th and 21st, and if it's Monday (1)
37
+ if [ "$dow" -ne 1 ]; then
38
+ echo "Not a Monday, exiting..."
39
+ exit 0
40
+ fi
41
+ if [ "$day" -ge 15 ] && [ "$day" -le 21 ]; then
42
+ echo "This is the third Monday of the month!"
43
+ else
44
+ echo "Not the third Monday, exiting..."
45
+ exit 0
46
+ fi
47
+
29
48
- name : Adding Issues
30
49
id : add-issues
31
50
uses : actions/github-script@v7
Original file line number Diff line number Diff line change 28
28
- name : Install dependencies
29
29
run : npm install @octokit/core@5.1.0
30
30
31
+ # Step to check if today is the third Monday
32
+ - name : Check if today is the third Monday
33
+ id : check-third-monday
34
+ run : |
35
+ day=$(date +%d)
36
+ dow=$(date +%u) # Day of the week (1 = Monday, ..., 7 = Sunday)
37
+ # Check if the day is between 15th and 21st, and if it's Monday (1)
38
+ if [ "$dow" -ne 1 ]; then
39
+ echo "Not a Monday, exiting..."
40
+ exit 0
41
+ fi
42
+ if [ "$day" -ge 15 ] && [ "$day" -le 21 ]; then
43
+ echo "This is the third Monday of the month!"
44
+ else
45
+ echo "Not the third Monday, exiting..."
46
+ exit 0
47
+ fi
48
+
31
49
- name : Send reminders
32
50
uses : actions/github-script@v7
33
51
env :
You can’t perform that action at this time.
0 commit comments